home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac-Source 1994 July
/
Mac-Source_July_1994.iso
/
C and C++
/
Libraries
/
usr (gcc 1.37 libs)
/
mac
/
console.i
< prev
next >
Wrap
Text File
|
1993-12-13
|
166KB
|
6,687 lines
# 1 "console.c"
# 1 "Desk.h" 1
# 1 "Types.h" 1
# 35 "Types.h"
typedef unsigned char Byte;
typedef char SignedByte;
typedef char *Ptr;
typedef Ptr *Handle;
typedef long Fixed;
typedef Fixed *FixedPtr;
typedef long Fract;
typedef Fract *FractPtr;
# 82 "Types.h"
enum {false,true};
typedef unsigned char Boolean;
enum {v,h};
typedef unsigned char VHSelect;
typedef long (*ProcPtr)();
typedef ProcPtr *ProcHandle;
typedef unsigned char Str255[256],Str63[64],Str32[33],Str31[32],Str27[28],Str15[16],*StringPtr,**StringHandle;
typedef const unsigned char *ConstStr255Param;
typedef ConstStr255Param ConstStr63Param,ConstStr32Param,ConstStr31Param,
ConstStr27Param,ConstStr15Param;
typedef short OSErr;
typedef unsigned long OSType;
typedef OSType *OSTypePtr;
typedef unsigned long ResType;
typedef ResType *ResTypePtr;
typedef unsigned char Style;
typedef short ScriptCode;
typedef short LangCode;
struct Point {
short v;
short h;
};
typedef struct Point Point;
typedef Point *PointPtr;
struct Rect {
short top;
short left;
short bottom;
short right;
};
typedef struct Rect Rect;
typedef Rect *RectPtr;
pascal void Debugger(void)
= 0xA9FF;
pascal void DebugStr(ConstStr255Param aStr)
= 0xABFF;
void debugstr(char *aStr);
pascal void SysBreak(void)
= {0x303C,0xFE16,0xA9C9};
pascal void SysBreakStr(ConstStr255Param debugStr)
= {0x303C,0xFE15,0xA9C9};
pascal void SysBreakFunc(ConstStr255Param debugFunc)
= {0x303C,0xFE14,0xA9C9};
# 18 "Desk.h" 2
# 1 "Quickdraw.h" 1
enum {
invalColReq = -1,
srcCopy = 0,
srcOr = 1,
srcXor = 2,
srcBic = 3,
notSrcCopy = 4,
notSrcOr = 5,
notSrcXor = 6,
notSrcBic = 7,
patCopy = 8,
patOr = 9,
patXor = 10,
patBic = 11,
notPatCopy = 12,
notPatOr = 13,
notPatXor = 14,
notPatBic = 15,
grayishTextOr = 49,
blend = 32,
addPin = 33
};
enum {
addOver = 34,
subPin = 35,
addMax = 37,
adMax = 37,
subOver = 38,
adMin = 39,
ditherCopy = 64,
transparent = 36,
normalBit = 0,
inverseBit = 1,
redBit = 4,
greenBit = 3,
blueBit = 2,
cyanBit = 8,
magentaBit = 7,
yellowBit = 6,
blackBit = 5,
blackColor = 33,
whiteColor = 30,
redColor = 205
};
enum {
greenColor = 341,
blueColor = 409,
cyanColor = 273,
magentaColor = 137,
yellowColor = 69,
picLParen = 0,
picRParen = 1,
normal = 0,
bold = 1,
italic = 2,
underline = 4,
outline = 8,
shadow = 0x10,
condense = 0x20,
extend = 0x40,
clutType = 0,
fixedType = 1,
directType = 2,
gdDevType = 0,
burstDevice = 7
};
enum {
ext32Device = 8,
ramInit = 10,
mainScreen = 11,
allInit = 12,
screenDevice = 13,
noDriver = 14,
screenActive = 15,
hiliteBit = 7,
pHiliteBit = 0,
defQDColors = 127,
RGBDirect = 16,
baseAddr32 = 4,
rgnOverflowErr = -147,
insufficientStackErr = -149
};
enum {frame,paint,erase,invert,fill};
typedef unsigned char GrafVerb;
enum {chunky,chunkyPlanar,planar};
typedef unsigned char PixelType;
typedef short Bits16[16];
struct Pattern{
unsigned char pat[8];
};
typedef struct Pattern Pattern;
typedef Pattern *PatPtr;
typedef const Pattern *ConstPatternParam;
typedef PatPtr *PatHandle;
typedef char QDByte, *QDPtr, **QDHandle;
typedef short QDErr;
enum {singleDevicesBit = 0,dontMatchSeedsBit = 1,allDevicesBit = 2};
enum {singleDevices = 1 << singleDevicesBit,dontMatchSeeds = 1 << dontMatchSeedsBit,
allDevices = 1 << allDevicesBit};
typedef unsigned long DeviceLoopFlags;
struct FontInfo {
short ascent;
short descent;
short widMax;
short leading;
};
typedef struct FontInfo FontInfo;
struct BitMap {
Ptr baseAddr;
short rowBytes;
Rect bounds;
};
typedef struct BitMap BitMap;
typedef BitMap *BitMapPtr, **BitMapHandle;
struct Cursor {
Bits16 data;
Bits16 mask;
Point hotSpot;
};
typedef struct Cursor Cursor;
typedef Cursor *CursPtr, **CursHandle;
struct PenState {
Point pnLoc;
Point pnSize;
short pnMode;
Pattern pnPat;
};
typedef struct PenState PenState;
struct Region {
short rgnSize;
Rect rgnBBox;
};
typedef struct Region Region;
typedef Region *RgnPtr, **RgnHandle;
struct Picture {
short picSize;
Rect picFrame;
};
typedef struct Picture Picture;
typedef Picture *PicPtr, **PicHandle;
struct Polygon {
short polySize;
Rect polyBBox;
Point polyPoints[1];
};
typedef struct Polygon Polygon;
typedef Polygon *PolyPtr, **PolyHandle;
struct QDProcs {
Ptr textProc;
Ptr lineProc;
Ptr rectProc;
Ptr rRectProc;
Ptr ovalProc;
Ptr arcProc;
Ptr polyProc;
Ptr rgnProc;
Ptr bitsProc;
Ptr commentProc;
Ptr txMeasProc;
Ptr getPicProc;
Ptr putPicProc;
};
typedef struct QDProcs QDProcs;
typedef QDProcs *QDProcsPtr;
struct GrafPort {
short device;
BitMap portBits;
Rect portRect;
RgnHandle visRgn;
RgnHandle clipRgn;
Pattern bkPat;
Pattern fillPat;
Point pnLoc;
Point pnSize;
short pnMode;
Pattern pnPat;
short pnVis;
short txFont;
Style txFace;
char filler;
short txMode;
short txSize;
Fixed spExtra;
long fgColor;
long bkColor;
short colrBit;
short patStretch;
Handle picSave;
Handle rgnSave;
Handle polySave;
QDProcsPtr grafProcs;
};
typedef struct GrafPort GrafPort;
typedef GrafPort *GrafPtr;
typedef GrafPtr WindowPtr;
struct RGBColor {
unsigned short red;
unsigned short green;
unsigned short blue;
};
typedef struct RGBColor RGBColor;
typedef pascal Boolean (*ColorSearchProcPtr)(RGBColor *rgb, long *position);
typedef pascal Boolean (*ColorComplementProcPtr)(RGBColor *rgb);
struct ColorSpec {
short value;
RGBColor rgb;
};
typedef struct ColorSpec ColorSpec;
typedef ColorSpec *ColorSpecPtr;
typedef ColorSpec CSpecArray[1];
struct ColorTable {
long ctSeed;
short ctFlags;
short ctSize;
CSpecArray ctTable;
};
typedef struct ColorTable ColorTable;
typedef ColorTable *CTabPtr, **CTabHandle;
struct MatchRec {
unsigned short red;
unsigned short green;
unsigned short blue;
long matchData;
};
typedef struct MatchRec MatchRec;
struct PixMap {
Ptr baseAddr;
short rowBytes;
Rect bounds;
short pmVersion;
short packType;
long packSize;
Fixed hRes;
Fixed vRes;
short pixelType;
short pixelSize;
short cmpCount;
short cmpSize;
long planeBytes;
CTabHandle pmTable;
long pmReserved;
};
typedef struct PixMap PixMap;
typedef PixMap *PixMapPtr, **PixMapHandle;
struct PixPat {
short patType;
PixMapHandle patMap;
Handle patData;
Handle patXData;
short patXValid;
Handle patXMap;
Pattern pat1Data;
};
typedef struct PixPat PixPat;
typedef PixPat *PixPatPtr, **PixPatHandle;
struct CCrsr {
short crsrType;
PixMapHandle crsrMap;
Handle crsrData;
Handle crsrXData;
short crsrXValid;
Handle crsrXHandle;
Bits16 crsr1Data;
Bits16 crsrMask;
Point crsrHotSpot;
long crsrXTable;
long crsrID;
};
typedef struct CCrsr CCrsr;
typedef CCrsr *CCrsrPtr, **CCrsrHandle;
struct CIcon {
PixMap iconPMap;
BitMap iconMask;
BitMap iconBMap;
Handle iconData;
short iconMaskData[1];
};
typedef struct CIcon CIcon;
typedef CIcon *CIconPtr, **CIconHandle;
struct GammaTbl {
short gVersion;
short gType;
short gFormulaSize;
short gChanCnt;
short gDataCnt;
short gDataWidth;
short gFormulaData[1];
};
typedef struct GammaTbl GammaTbl;
typedef GammaTbl *GammaTblPtr, **GammaTblHandle;
struct ITab {
long iTabSeed;
short iTabRes;
unsigned char iTTable[1];
};
typedef struct ITab ITab;
typedef ITab *ITabPtr, **ITabHandle;
struct SProcRec {
Handle nxtSrch;
ColorSearchProcPtr srchProc;
};
typedef struct SProcRec SProcRec;
typedef SProcRec *SProcPtr, **SProcHndl;
struct CProcRec {
Handle nxtComp;
ColorComplementProcPtr compProc;
};
typedef struct CProcRec CProcRec;
typedef CProcRec *CProcPtr, **CProcHndl;
struct GDevice {
short gdRefNum;
short gdID;
short gdType;
ITabHandle gdITable;
short gdResPref;
SProcHndl gdSearchProc;
CProcHndl gdCompProc;
short gdFlags;
PixMapHandle gdPMap;
long gdRefCon;
Handle gdNextGD;
Rect gdRect;
long gdMode;
short gdCCBytes;
short gdCCDepth;
Handle gdCCXData;
Handle gdCCXMask;
long gdReserved;
};
typedef struct GDevice GDevice;
typedef GDevice *GDPtr, **GDHandle;
struct GrafVars {
RGBColor rgbOpColor;
RGBColor rgbHiliteColor;
Handle pmFgColor;
short pmFgIndex;
Handle pmBkColor;
short pmBkIndex;
short pmFlags;
};
typedef struct GrafVars GrafVars;
typedef GrafVars *GVarPtr, **GVarHandle;
struct CQDProcs {
Ptr textProc;
Ptr lineProc;
Ptr rectProc;
Ptr rRectProc;
Ptr ovalProc;
Ptr arcProc;
Ptr polyProc;
Ptr rgnProc;
Ptr bitsProc;
Ptr commentProc;
Ptr txMeasProc;
Ptr getPicProc;
Ptr putPicProc;
Ptr opcodeProc;
Ptr newProc1;
Ptr newProc2;
Ptr newProc3;
Ptr newProc4;
Ptr newProc5;
Ptr newProc6;
};
typedef struct CQDProcs CQDProcs;
typedef CQDProcs *CQDProcsPtr;
struct CGrafPort {
short device;
PixMapHandle portPixMap;
short portVersion;
Handle grafVars;
short chExtra;
short pnLocHFrac;
Rect portRect;
RgnHandle visRgn;
RgnHandle clipRgn;
PixPatHandle bkPixPat;
RGBColor rgbFgColor;
RGBColor rgbBkColor;
Point pnLoc;
Point pnSize;
short pnMode;
PixPatHandle pnPixPat;
PixPatHandle fillPixPat;
short pnVis;
short txFont;
Style txFace;
char filler;
short txMode;
short txSize;
Fixed spExtra;
long fgColor;
long bkColor;
short colrBit;
short patStretch;
Handle picSave;
Handle rgnSave;
Handle polySave;
CQDProcsPtr grafProcs;
};
typedef struct CGrafPort CGrafPort;
typedef CGrafPort *CGrafPtr;
typedef CGrafPtr CWindowPtr;
struct ReqListRec {
short reqLSize;
short reqLData[1];
};
typedef struct ReqListRec ReqListRec;
struct OpenCPicParams {
Rect srcRect;
Fixed hRes;
Fixed vRes;
short version;
short reserved1;
long reserved2;
};
typedef struct OpenCPicParams OpenCPicParams;
typedef pascal void (*DeviceLoopDrawingProcPtr)(short depth, short deviceFlags, GDHandle targetDevice, long userData);
extern struct {
char privates[76];
long randSeed;
BitMap screenBits;
Cursor arrow;
Pattern dkGray;
Pattern ltGray;
Pattern gray;
Pattern black;
Pattern white;
GrafPtr thePort;
}qd;
pascal void InitGraf(void *globalPtr)
= 0xA86E;
pascal void OpenPort(GrafPtr port)
= 0xA86F;
pascal void InitPort(GrafPtr port)
= 0xA86D;
pascal void ClosePort(GrafPtr port)
= 0xA87D;
pascal void SetPort(GrafPtr port)
= 0xA873;
pascal void GetPort(GrafPtr *port)
= 0xA874;
pascal void GrafDevice(short device)
= 0xA872;
pascal void SetPortBits(const BitMap *bm)
= 0xA875;
pascal void PortSize(short width,short height)
= 0xA876;
pascal void MovePortTo(short leftGlobal,short topGlobal)
= 0xA877;
pascal void SetOrigin(short h,short v)
= 0xA878;
pascal void SetClip(RgnHandle rgn)
= 0xA879;
pascal void GetClip(RgnHandle rgn)
= 0xA87A;
pascal void ClipRect(const Rect *r)
= 0xA87B;
pascal void BackPat(ConstPatternParam pat)
= 0xA87C;
pascal void InitCursor(void)
= 0xA850;
pascal void SetCursor(const Cursor *crsr)
= 0xA851;
pascal void HideCursor(void)
= 0xA852;
pascal void ShowCursor(void)
= 0xA853;
pascal void ObscureCursor(void)
= 0xA856;
pascal void HidePen(void)
= 0xA896;
pascal void ShowPen(void)
= 0xA897;
pascal void GetPen(Point *pt)
= 0xA89A;
pascal void GetPenState(PenState *pnState)
= 0xA898;
pascal void SetPenState(const PenState *pnState)
= 0xA899;
pascal void PenSize(short width,short height)
= 0xA89B;
pascal void PenMode(short mode)
= 0xA89C;
pascal void PenPat(ConstPatternParam pat)
= 0xA89D;
pascal void PenNormal(void)
= 0xA89E;
pascal void MoveTo(short h,short v)
= 0xA893;
pascal void Move(short dh,short dv)
= 0xA894;
pascal void LineTo(short h,short v)
= 0xA891;
pascal void Line(short dh,short dv)
= 0xA892;
pascal void TextFont(short font)
= 0xA887;
pascal void TextFace(short face)
= 0xA888;
pascal void TextMode(short mode)
= 0xA889;
pascal void TextSize(short size)
= 0xA88A;
pascal void SpaceExtra(Fixed extra)
= 0xA88E;
pascal void DrawChar(short ch)
= 0xA883;
pascal void DrawString(ConstStr255Param s)
= 0xA884;
pascal void DrawText(const void *textBuf,short firstByte,short byteCount)
= 0xA885;
pascal short CharWidth(short ch)
= 0xA88D;
pascal short StringWidth(ConstStr255Param s)
= 0xA88C;
pascal short TextWidth(const void *textBuf,short firstByte,short byteCount)
= 0xA886;
pascal void MeasureText(short count,const void *textAddr,void *charLocs)
= 0xA837;
pascal void GetFontInfo(FontInfo *info)
= 0xA88B;
pascal void ForeColor(long color)
= 0xA862;
pascal void BackColor(long color)
= 0xA863;
pascal void ColorBit(short whichBit)
= 0xA864;
pascal void SetRect(Rect *r,short left,short top,short right,short bottom)
= 0xA8A7;
pascal void OffsetRect(Rect *r,short dh,short dv)
= 0xA8A8;
pascal void InsetRect(Rect *r,short dh,short dv)
= 0xA8A9;
pascal Boolean SectRect(const Rect *src1,const Rect *src2,Rect *dstRect)
= 0xA8AA;
pascal void UnionRect(const Rect *src1,const Rect *src2,Rect *dstRect)
= 0xA8AB;
pascal Boolean EqualRect(const Rect *rect1,const Rect *rect2)
= 0xA8A6;
pascal Boolean EmptyRect(const Rect *r)
= 0xA8AE;
pascal void FrameRect(const Rect *r)
= 0xA8A1;
pascal void PaintRect(const Rect *r)
= 0xA8A2;
pascal void EraseRect(const Rect *r)
= 0xA8A3;
pascal void InvertRect(const Rect *r)
= 0xA8A4;
pascal void FillRect(const Rect *r,ConstPatternParam pat)
= 0xA8A5;
pascal void FrameOval(const Rect *r)
= 0xA8B7;
pascal void PaintOval(const Rect *r)
= 0xA8B8;
pascal void EraseOval(const Rect *r)
= 0xA8B9;
pascal void InvertOval(const Rect *r)
= 0xA8BA;
pascal void FillOval(const Rect *r,ConstPatternParam pat)
= 0xA8BB;
pascal void FrameRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
= 0xA8B0;
pascal void PaintRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
= 0xA8B1;
pascal void EraseRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
= 0xA8B2;
pascal void InvertRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
= 0xA8B3;
pascal void FillRoundRect(const Rect *r,short ovalWidth,short ovalHeight,
ConstPatternParam pat)
= 0xA8B4;
pascal void FrameArc(const Rect *r,short startAngle,short arcAngle)
= 0xA8BE;
pascal void PaintArc(const Rect *r,short startAngle,short arcAngle)
= 0xA8BF;
pascal void EraseArc(const Rect *r,short startAngle,short arcAngle)
= 0xA8C0;
pascal void InvertArc(const Rect *r,short startAngle,short arcAngle)
= 0xA8C1;
pascal void FillArc(const Rect *r,short startAngle,short arcAngle,ConstPatternParam pat)
= 0xA8C2;
pascal RgnHandle NewRgn(void)
= 0xA8D8;
pascal void OpenRgn(void)
= 0xA8DA;
pascal void CloseRgn(RgnHandle dstRgn)
= 0xA8DB;
pascal OSErr BitMapToRegionGlue(RgnHandle region,const BitMap *bMap);
pascal OSErr BitMapToRegion(RgnHandle region,const BitMap *bMap)
= 0xA8D7;
pascal void DisposeRgn(RgnHandle rgn)
= 0xA8D9;
pascal void CopyRgn(RgnHandle srcRgn,RgnHandle dstRgn)
= 0xA8DC;
pascal void SetEmptyRgn(RgnHandle rgn)
= 0xA8DD;
pascal void SetRectRgn(RgnHandle rgn,short left,short top,short right,short bottom)
= 0xA8DE;
pascal void RectRgn(RgnHandle rgn,const Rect *r)
= 0xA8DF;
pascal void OffsetRgn(RgnHandle rgn,short dh,short dv)
= 0xA8E0;
pascal void InsetRgn(RgnHandle rgn,short dh,short dv)
= 0xA8E1;
pascal void SectRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
= 0xA8E4;
pascal void UnionRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
= 0xA8E5;
pascal void DiffRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
= 0xA8E6;
pascal void XorRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
= 0xA8E7;
pascal Boolean RectInRgn(const Rect *r,RgnHandle rgn)
= 0xA8E9;
pascal Boolean EqualRgn(RgnHandle rgnA,RgnHandle rgnB)
= 0xA8E3;
pascal Boolean EmptyRgn(RgnHandle rgn)
= 0xA8E2;
pascal void FrameRgn(RgnHandle rgn)
= 0xA8D2;
pascal void PaintRgn(RgnHandle rgn)
= 0xA8D3;
pascal void EraseRgn(RgnHandle rgn)
= 0xA8D4;
pascal void InvertRgn(RgnHandle rgn)
= 0xA8D5;
pascal void FillRgn(RgnHandle rgn,ConstPatternParam pat)
= 0xA8D6;
pascal void ScrollRect(const Rect *r,short dh,short dv,RgnHandle updateRgn)
= 0xA8EF;
pascal void CopyBits(const BitMap *srcBits,const BitMap *dstBits,const Rect *srcRect,
const Rect *dstRect,short mode,RgnHandle maskRgn)
= 0xA8EC;
pascal void SeedFill(const void *srcPtr,void *dstPtr,short srcRow,short dstRow,
short height,short words,short seedH,short seedV)
= 0xA839;
pascal void CalcMask(const void *srcPtr,void *dstPtr,short srcRow,short dstRow,
short height,short words)
= 0xA838;
pascal void CopyMask(const BitMap *srcBits,const BitMap *maskBits,const BitMap *dstBits,
const Rect *srcRect,const Rect *maskRect,const Rect *dstRect)
= 0xA817;
pascal PicHandle OpenPicture(const Rect *picFrame)
= 0xA8F3;
pascal void PicComment(short kind,short dataSize,Handle dataHandle)
= 0xA8F2;
pascal void ClosePicture(void)
= 0xA8F4;
pascal void DrawPicture(PicHandle myPicture,const Rect *dstRect)
= 0xA8F6;
pascal void KillPicture(PicHandle myPicture)
= 0xA8F5;
pascal PolyHandle OpenPoly(void)
= 0xA8CB;
pascal void ClosePoly(void)
= 0xA8CC;
pascal void KillPoly(PolyHandle poly)
= 0xA8CD;
pascal void OffsetPoly(PolyHandle poly,short dh,short dv)
= 0xA8CE;
pascal void FramePoly(PolyHandle poly)
= 0xA8C6;
pascal void PaintPoly(PolyHandle poly)
= 0xA8C7;
pascal void ErasePoly(PolyHandle poly)
= 0xA8C8;
pascal void InvertPoly(PolyHandle poly)
= 0xA8C9;
pascal void FillPoly(PolyHandle poly,ConstPatternParam pat)
= 0xA8CA;
pascal void SetPt(Point *pt,short h,short v)
= 0xA880;
pascal void LocalToGlobal(Point *pt)
= 0xA870;
pascal void GlobalToLocal(Point *pt)
= 0xA871;
pascal short Random(void)
= 0xA861;
pascal void StuffHex(void *thingPtr,ConstStr255Param s)
= 0xA866;
pascal Boolean GetPixel(short h,short v)
= 0xA865;
pascal void ScalePt(Point *pt,const Rect *srcRect,const Rect *dstRect)
= 0xA8F8;
pascal void MapPt(Point *pt,const Rect *srcRect,const Rect *dstRect)
= 0xA8F9;
pascal void MapRect(Rect *r,const Rect *srcRect,const Rect *dstRect)
= 0xA8FA;
pascal void MapRgn(RgnHandle rgn,const Rect *srcRect,const Rect *dstRect)
= 0xA8FB;
pascal void MapPoly(PolyHandle poly,const Rect *srcRect,const Rect *dstRect)
= 0xA8FC;
pascal void SetStdProcs(QDProcs *procs)
= 0xA8EA;
pascal void StdRect(GrafVerb verb,const Rect *r)
= 0xA8A0;
pascal void StdRRect(GrafVerb verb,const Rect *r,short ovalWidth,short ovalHeight)
= 0xA8AF;
pascal void StdOval(GrafVerb verb,const Rect *r)
= 0xA8B6;
pascal void StdArc(GrafVerb verb,const Rect *r,short startAngle,short arcAngle)
= 0xA8BD;
pascal void StdPoly(GrafVerb verb,PolyHandle poly)
= 0xA8C5;
pascal void StdRgn(GrafVerb verb,RgnHandle rgn)
= 0xA8D1;
pascal void StdBits(const BitMap *srcBits,const Rect *srcRect,const Rect *dstRect,
short mode,RgnHandle maskRgn)
= 0xA8EB;
pascal void StdComment(short kind,short dataSize,Handle dataHandle)
= 0xA8F1;
pascal short StdTxMeas(short byteCount,const void *textAddr,Point *numer,
Point *denom,FontInfo *info)
= 0xA8ED;
pascal void StdGetPic(void *dataPtr,short byteCount)
= 0xA8EE;
pascal void StdPutPic(const void *dataPtr,short byteCount)
= 0xA8F0;
pascal void AddPt(Point src,Point *dst)
= 0xA87E;
void subpt(Point *src,Point *dst);
pascal Boolean EqualPt(Point pt1,Point pt2)
= 0xA881;
pascal Boolean PtInRect(Point pt,const Rect *r)
= 0xA8AD;
pascal void Pt2Rect(Point pt1,Point pt2,Rect *dstRect)
= 0xA8AC;
pascal void PtToAngle(const Rect *r,Point pt,short *angle)
= 0xA8C3;
pascal Boolean PtInRgn(Point pt,RgnHandle rgn)
= 0xA8E8;
pascal void StdText(short count,const void *textAddr,Point numer,Point denom)
= 0xA882;
pascal void StdLine(Point newPt)
= 0xA890;
pascal void OpenCPort(CGrafPtr port)
= 0xAA00;
pascal void InitCPort(CGrafPtr port)
= 0xAA01;
pascal void CloseCPort(CGrafPtr port)
= 0xA87D;
pascal PixMapHandle NewPixMap(void)
= 0xAA03;
pascal void DisposPixMap(PixMapHandle pm)
= 0xAA04;
pascal void DisposePixMap(PixMapHandle pm)
= 0xAA04;
pascal void CopyPixMap(PixMapHandle srcPM,PixMapHandle dstPM)
= 0xAA05;
pascal PixPatHandle NewPixPat(void)
= 0xAA07;
pascal void DisposPixPat(PixPatHandle pp)
= 0xAA08;
pascal void DisposePixPat(PixPatHandle pp)
= 0xAA08;
pascal void CopyPixPat(PixPatHandle srcPP,PixPatHandle dstPP)
= 0xAA09;
pascal void PenPixPat(PixPatHandle pp)
= 0xAA0A;
pascal void BackPixPat(PixPatHandle pp)
= 0xAA0B;
pascal PixPatHandle GetPixPat(short patID)
= 0xAA0C;
pascal void MakeRGBPat(PixPatHandle pp,const RGBColor *myColor)
= 0xAA0D;
pascal void FillCRect(const Rect *r,PixPatHandle pp)
= 0xAA0E;
pascal void FillCOval(const Rect *r,PixPatHandle pp)
= 0xAA0F;
pascal void FillCRoundRect(const Rect *r,short ovalWidth,short ovalHeight,
PixPatHandle pp)
= 0xAA10;
pascal void FillCArc(const Rect *r,short startAngle,short arcAngle,PixPatHandle pp)
= 0xAA11;
pascal void FillCRgn(RgnHandle rgn,PixPatHandle pp)
= 0xAA12;
pascal void FillCPoly(PolyHandle poly,PixPatHandle pp)
= 0xAA13;
pascal void RGBForeColor(const RGBColor *color)
= 0xAA14;
pascal void RGBBackColor(const RGBColor *color)
= 0xAA15;
pascal void SetCPixel(short h,short v,const RGBColor *cPix)
= 0xAA16;
pascal void SetPortPix(PixMapHandle pm)
= 0xAA06;
pascal void GetCPixel(short h,short v,RGBColor *cPix)
= 0xAA17;
pascal void GetForeColor(RGBColor *color)
= 0xAA19;
pascal void GetBackColor(RGBColor *color)
= 0xAA1A;
pascal void SeedCFill(const BitMap *srcBits,const BitMap *dstBits,const Rect *srcRect,
const Rect *dstRect,short seedH,short seedV,ColorSearchProcPtr matchProc,
long matchData)
= 0xAA50;
pascal void CalcCMask(const BitMap *srcBits,const BitMap *dstBits,const Rect *srcRect,
const Rect *dstRect,const RGBColor *seedRGB,ColorSearchProcPtr matchProc,
long matchData)
= 0xAA4F;
pascal PicHandle OpenCPicture(const OpenCPicParams *newHeader)
= 0xAA20;
pascal void OpColor(const RGBColor *color)
= 0xAA21;
pascal void HiliteColor(const RGBColor *color)
= 0xAA22;
pascal void DisposCTable(CTabHandle cTable)
= 0xAA24;
pascal void DisposeCTable(CTabHandle cTable)
= 0xAA24;
pascal CTabHandle GetCTable(short ctID)
= 0xAA18;
pascal CCrsrHandle GetCCursor(short crsrID)
= 0xAA1B;
pascal void SetCCursor(CCrsrHandle cCrsr)
= 0xAA1C;
pascal void AllocCursor(void)
= 0xAA1D;
pascal void DisposCCursor(CCrsrHandle cCrsr)
= 0xAA26;
pascal void DisposeCCursor(CCrsrHandle cCrsr)
= 0xAA26;
pascal CIconHandle GetCIcon(short iconID)
= 0xAA1E;
pascal void PlotCIcon(const Rect *theRect,CIconHandle theIcon)
= 0xAA1F;
pascal void DisposCIcon(CIconHandle theIcon)
= 0xAA25;
pascal void DisposeCIcon(CIconHandle theIcon)
= 0xAA25;
pascal void SetStdCProcs(CQDProcs *procs)
= 0xAA4E;
pascal void CharExtra(Fixed extra)
= 0xAA23;
pascal GDHandle GetMaxDevice(const Rect *globalRect)
= 0xAA27;
pascal long GetCTSeed(void)
= 0xAA28;
pascal GDHandle GetDeviceList(void)
= 0xAA29;
pascal GDHandle GetMainDevice(void)
= 0xAA2A;
pascal GDHandle GetNextDevice(GDHandle curDevice)
= 0xAA2B;
pascal Boolean TestDeviceAttribute(GDHandle gdh,short attribute)
= 0xAA2C;
pascal void SetDeviceAttribute(GDHandle gdh,short attribute,Boolean value)
= 0xAA2D;
pascal void InitGDevice(short qdRefNum,long mode,GDHandle gdh)
= 0xAA2E;
pascal GDHandle NewGDevice(short refNum,long mode)
= 0xAA2F;
pascal void DisposGDevice(GDHandle gdh)
= 0xAA30;
pascal void DisposeGDevice(GDHandle gdh)
= 0xAA30;
pascal void SetGDevice(GDHandle gd)
= 0xAA31;
pascal GDHandle GetGDevice(void)
= 0xAA32;
pascal long Color2Index(const RGBColor *myColor)
= 0xAA33;
pascal void Index2Color(long index,RGBColor *aColor)
= 0xAA34;
pascal void InvertColor(RGBColor *myColor)
= 0xAA35;
pascal Boolean RealColor(const RGBColor *color)
= 0xAA36;
pascal void GetSubTable(CTabHandle myColors,short iTabRes,CTabHandle targetTbl)
= 0xAA37;
pascal void MakeITable(CTabHandle cTabH,ITabHandle iTabH,short res)
= 0xAA39;
pascal void AddSearch(ColorSearchProcPtr searchProc)
= 0xAA3A;
pascal void AddComp(ColorComplementProcPtr compProc)
= 0xAA3B;
pascal void DelSearch(ColorSearchProcPtr searchProc)
= 0xAA4C;
pascal void DelComp(ColorComplementProcPtr compProc)
= 0xAA4D;
pascal void SubPt(Point src,Point *dst)
= 0xA87F;
pascal void SetClientID(short id)
= 0xAA3C;
pascal void ProtectEntry(short index,Boolean protect)
= 0xAA3D;
Boolean equalpt(Point *pt1,Point *pt2);
pascal void ReserveEntry(short index,Boolean reserve)
= 0xAA3E;
pascal void SetEntries(short start,short count,CSpecArray aTable)
= 0xAA3F;
Boolean ptinrect(Point *pt,const Rect *r);
pascal void SaveEntries(CTabHandle srcTable,CTabHandle resultTable,ReqListRec *selection)
= 0xAA49;
pascal void RestoreEntries(CTabHandle srcTable,CTabHandle dstTable,ReqListRec *selection)
= 0xAA4A;
void pt2rect(Point *pt1,Point *pt2,const Rect *destRect);
pascal short QDError(void)
= 0xAA40;
pascal void CopyDeepMask(const BitMap *srcBits,const BitMap *maskBits,const BitMap *dstBits,
const Rect *srcRect,const Rect *maskRect,const Rect *dstRect,short mode,
RgnHandle maskRgn)
= 0xAA51;
pascal void DeviceLoop(RgnHandle drawingRgn,DeviceLoopDrawingProcPtr drawingProc,
long userData,DeviceLoopFlags flags)
= 0xABCA;
#pragma parameter __A0 GetMaskTable
pascal Ptr GetMaskTable(void)
= 0xA836;
void pttoangle(const Rect *r,Point *pt,short *angle);
Boolean ptinrgn(Point *pt,RgnHandle rgn);
void stdtext(short count,const void *textAddr,Point *numer,Point *denom);
void stdline(Point *newPt);
void drawstring(char *s);
void addpt(Point *src,Point *dst);
void stuffhex(Ptr thingPtr,char *s);
short stringwidth(char *s);
# 22 "Desk.h" 2
# 1 "Events.h" 1
enum {
nullEvent = 0,
mouseDown = 1,
mouseUp = 2,
keyDown = 3,
keyUp = 4,
autoKey = 5,
updateEvt = 6,
diskEvt = 7,
activateEvt = 8,
osEvt = 15,
mDownMask = 2,
mUpMask = 4,
keyDownMask = 8,
keyUpMask = 16,
autoKeyMask = 32,
updateMask = 64,
diskMask = 128,
activMask = 256,
highLevelEventMask = 1024,
osMask = -32768
};
enum {
everyEvent = -1,
charCodeMask = 0x000000FF,
keyCodeMask = 0x0000FF00,
adbAddrMask = 0x00FF0000,
osEvtMessageMask = 0xFF000000,
mouseMovedMessage = 0xFA,
suspendResumeMessage = 0x01,
resumeFlag = 1,
convertClipboardFlag = 2,
activeFlag = 1,
btnState = 128,
cmdKey = 256,
shiftKey = 512,
alphaLock = 1024,
optionKey = 2048,
controlKey = 4096,
networkEvt = 10,
driverEvt = 11,
app1Evt = 12,
app2Evt = 13
};
enum {
app3Evt = 14,
app4Evt = 15,
networkMask = 1024,
driverMask = 2048,
app1Mask = 4096,
app2Mask = 8192,
app3Mask = 16384,
app4Mask = -32768
};
struct EventRecord {
short what;
long message;
long when;
Point where;
short modifiers;
};
typedef struct EventRecord EventRecord;
typedef long KeyMap[4];
pascal Boolean GetNextEvent(short eventMask,EventRecord *theEvent)
= 0xA970;
pascal Boolean WaitNextEvent(short eventMask,EventRecord *theEvent,unsigned long sleep,
RgnHandle mouseRgn)
= 0xA860;
pascal Boolean EventAvail(short eventMask,EventRecord *theEvent)
= 0xA971;
pascal void GetMouse(Point *mouseLoc)
= 0xA972;
pascal Boolean Button(void)
= 0xA974;
pascal Boolean StillDown(void)
= 0xA973;
pascal Boolean WaitMouseUp(void)
= 0xA977;
pascal void GetKeys(KeyMap theKeys)
= 0xA976;
pascal unsigned long TickCount(void)
= 0xA975;
# 26 "Desk.h" 2
enum {
accEvent = 64,
accRun = 65,
accCursor = 66,
accMenu = 67,
accUndo = 68,
accCut = 70,
accCopy = 71,
accPaste = 72,
accClear = 73,
goodbye = -1
};
pascal short OpenDeskAcc(ConstStr255Param deskAccName)
= 0xA9B6;
pascal void CloseDeskAcc(short refNum)
= 0xA9B7;
pascal void SystemClick(const EventRecord *theEvent,WindowPtr theWindow)
= 0xA9B3;
pascal Boolean SystemEdit(short editCmd)
= 0xA9C2;
pascal void SystemTask(void)
= 0xA9B4;
pascal Boolean SystemEvent(const EventRecord *theEvent)
= 0xA9B2;
pascal void SystemMenu(long menuResult)
= 0xA9B5;
short opendeskacc(char *deskAccName);
# 7 "console.c" 2
# 1 "Scrap.h" 1
struct ScrapStuff {
long scrapSize;
Handle scrapHandle;
short scrapCount;
short scrapState;
StringPtr scrapName;
};
typedef struct ScrapStuff ScrapStuff;
typedef ScrapStuff *PScrapStuff;
pascal PScrapStuff InfoScrap(void)
= 0xA9F9;
pascal long UnloadScrap(void)
= 0xA9FA;
pascal long LoadScrap(void)
= 0xA9FB;
pascal long GetScrap(Handle hDest,ResType theType,long *offset)
= 0xA9FD;
pascal long ZeroScrap(void)
= 0xA9FC;
pascal long PutScrap(long length,ResType theType,Ptr source)
= 0xA9FE;
# 8 "console.c" 2
# 1 "Fonts.h" 1
enum {
systemFont = 0,
applFont = 1,
newYork = 2,
geneva = 3,
monaco = 4,
venice = 5,
london = 6,
athens = 7,
sanFran = 8,
toronto = 9,
cairo = 11,
losAngeles = 12,
times = 20,
helvetica = 21,
courier = 22,
symbol = 23,
mobile = 24,
commandMark = 17,
checkMark = 18,
diamondMark = 19
};
enum {
appleMark = 20,
propFont = 36864,
prpFntH = 36865,
prpFntW = 36866,
prpFntHW = 36867,
fixedFont = 45056,
fxdFntH = 45057,
fxdFntW = 45058,
fxdFntHW = 45059,
fontWid = 44208
};
struct FMInput {
short family;
short size;
Style face;
Boolean needBits;
short device;
Point numer;
Point denom;
};
typedef struct FMInput FMInput;
struct FMOutput {
short errNum;
Handle fontHandle;
unsigned char boldPixels;
unsigned char italicPixels;
unsigned char ulOffset;
unsigned char ulShadow;
unsigned char ulThick;
unsigned char shadowPixels;
char extra;
unsigned char ascent;
unsigned char descent;
unsigned char widMax;
char leading;
char unused;
Point numer;
Point denom;
};
typedef struct FMOutput FMOutput;
typedef FMOutput *FMOutPtr;
struct FontRec {
short fontType;
short firstChar;
short lastChar;
short widMax;
short kernMax;
short nDescent;
short fRectWidth;
short fRectHeight;
short owTLoc;
short ascent;
short descent;
short leading;
short rowWords;
};
typedef struct FontRec FontRec;
struct FMetricRec {
Fixed ascent;
Fixed descent;
Fixed leading;
Fixed widMax;
Handle wTabHandle;
};
typedef struct FMetricRec FMetricRec;
struct WidEntry {
short widStyle;
};
typedef struct WidEntry WidEntry;
struct WidTable {
short numWidths;
};
typedef struct WidTable WidTable;
struct AsscEntry {
short fontSize;
short fontStyle;
short fontID;
};
typedef struct AsscEntry AsscEntry;
struct FontAssoc {
short numAssoc;
};
typedef struct FontAssoc FontAssoc;
struct StyleTable {
short fontClass;
long offset;
long reserved;
char indexes[48];
};
typedef struct StyleTable StyleTable;
struct NameTable {
short stringCount;
Str255 baseFontName;
};
typedef struct NameTable NameTable;
struct KernPair {
char kernFirst;
char kernSecond;
short kernWidth;
};
typedef struct KernPair KernPair;
struct KernEntry {
short kernLength;
short kernStyle;
};
typedef struct KernEntry KernEntry;
struct KernTable {
short numKerns;
};
typedef struct KernTable KernTable;
struct WidthTable {
Fixed tabData[256];
Handle tabFont;
long sExtra;
long style;
short fID;
short fSize;
short face;
short device;
Point inNumer;
Point inDenom;
short aFID;
Handle fHand;
Boolean usedFam;
unsigned char aFace;
short vOutput;
short hOutput;
short vFactor;
short hFactor;
short aSize;
short tabSize;
};
typedef struct WidthTable WidthTable;
struct FamRec {
short ffFlags;
short ffFamID;
short ffFirstChar;
short ffLastChar;
short ffAscent;
short ffDescent;
short ffLeading;
short ffWidMax;
long ffWTabOff;
long ffKernOff;
long ffStylOff;
short ffProperty[9];
short ffIntl[2];
short ffVersion;
};
typedef struct FamRec FamRec;
pascal void InitFonts(void)
= 0xA8FE;
pascal void GetFontName(short familyID,Str255 name)
= 0xA8FF;
pascal void GetFNum(ConstStr255Param name,short *familyID)
= 0xA900;
pascal Boolean RealFont(short fontNum,short size)
= 0xA902;
pascal void SetFontLock(Boolean lockFlag)
= 0xA903;
pascal FMOutPtr FMSwapFont(const FMInput *inRec)
= 0xA901;
pascal void SetFScaleDisable(Boolean fscaleDisable)
= 0xA834;
pascal void FontMetrics(const FMetricRec *theMetrics)
= 0xA835;
pascal void SetFractEnable(Boolean fractEnable);
pascal Boolean IsOutline(Point numer,Point denom)
= {0x7000,0xA854};
pascal void SetOutlinePreferred(Boolean outlinePreferred)
= {0x7001,0xA854};
pascal Boolean GetOutlinePreferred(void)
= {0x7009,0xA854};
pascal OSErr OutlineMetrics(short byteCount,const void *textPtr,Point numer,
Point denom,short *yMax,short *yMin,FixedPtr awArray,FixedPtr lsbArray,
RectPtr boundsArray)
= {0x7008,0xA854};
pascal void SetPreserveGlyph(Boolean preserveGlyph)
= {0x700A,0xA854};
pascal Boolean GetPreserveGlyph(void)
= {0x700B,0xA854};
pascal OSErr FlushFonts(void)
= {0x700C,0xA854};
void getfnum(char *theName,short *familyID);
void getfontname(short familyID,char *theName);
# 9 "console.c" 2
# 1 "Memory.h" 1
enum {
maxSize = 0x800000,
defaultPhysicalEntryCount = 8,
kPageInMemory = 0,
kPageOnDisk = 1,
kNotPaged = 2
};
typedef long Size;
typedef pascal long (*GrowZoneProcPtr)(Size cbNeeded);
struct Zone {
Ptr bkLim;
Ptr purgePtr;
Ptr hFstFree;
long zcbFree;
GrowZoneProcPtr gzProc;
short moreMast;
short flags;
short cntRel;
short maxRel;
short cntNRel;
short maxNRel;
short cntEmpty;
short cntHandles;
long minCBFree;
ProcPtr purgeProc;
Ptr sparePtr;
Ptr allocPtr;
short heapData;
};
typedef struct Zone Zone;
typedef Zone *THz;
struct MemoryBlock {
void * address;
unsigned long count;
};
typedef struct MemoryBlock MemoryBlock;
struct LogicalToPhysicalTable {
MemoryBlock logical;
MemoryBlock physical[defaultPhysicalEntryCount];
};
typedef struct LogicalToPhysicalTable LogicalToPhysicalTable;
typedef short PageState;
typedef short StatusRegisterContents;
#pragma parameter __A0 GetZone
pascal THz GetZone(void)
= 0xA11A;
#pragma parameter __A0 NewHandle(__D0)
pascal Handle NewHandle(Size byteCount)
= 0xA122;
#pragma parameter __A0 NewHandleSys(__D0)
pascal Handle NewHandleSys(Size byteCount)
= 0xA522;
#pragma parameter __A0 NewHandleClear(__D0)
pascal Handle NewHandleClear(Size byteCount)
= 0xA322;
#pragma parameter __A0 NewHandleSysClear(__D0)
pascal Handle NewHandleSysClear(Size byteCount)
= 0xA722;
#pragma parameter __A0 HandleZone(__A0)
pascal THz HandleZone(Handle h)
= 0xA126;
#pragma parameter __A0 RecoverHandle(__A0)
pascal Handle RecoverHandle(Ptr p)
= 0xA128;
#pragma parameter __A0 RecoverHandleSys(__A0)
pascal Handle RecoverHandleSys(Ptr p)
= 0xA528;
#pragma parameter __A0 NewPtr(__D0)
pascal Ptr NewPtr(Size byteCount)
= 0xA11E;
#pragma parameter __A0 NewPtrSys(__D0)
pascal Ptr NewPtrSys(Size byteCount)
= 0xA51E;
#pragma parameter __A0 NewPtrClear(__D0)
pascal Ptr NewPtrClear(Size byteCount)
= 0xA31E;
#pragma parameter __A0 NewPtrSysClear(__D0)
pascal Ptr NewPtrSysClear(Size byteCount)
= 0xA71E;
#pragma parameter __A0 PtrZone(__A0)
pascal THz PtrZone(Ptr p)
= 0xA148;
#pragma parameter __D0 MaxBlock
pascal long MaxBlock(void)
= 0xA061;
#pragma parameter __D0 MaxBlockSys
pascal long MaxBlockSys(void)
= 0xA461;
#pragma parameter __D0 StackSpace
pascal long StackSpace(void)
= 0xA065;
#pragma parameter __A0 NewEmptyHandle
pascal Handle NewEmptyHandle(void)
= 0xA166;
#pragma parameter __A0 NewEmptyHandleSys
pascal Handle NewEmptyHandleSys(void)
= 0xA566;
#pragma parameter HLock(__A0)
pascal void HLock(Handle h)
= 0xA029;
#pragma parameter HUnlock(__A0)
pascal void HUnlock(Handle h)
= 0xA02A;
#pragma parameter HPurge(__A0)
pascal void HPurge(Handle h)
= 0xA049;
#pragma parameter HNoPurge(__A0)
pascal void HNoPurge(Handle h)
= 0xA04A;
#pragma parameter HLockHi(__A0)
pascal void HLockHi(Handle h)
= {0xA064,0xA029};
pascal Ptr StripAddress(void *theAddress);
#pragma parameter __D0 Translate24To32(__D0)
pascal Ptr Translate24To32(void *addr24)
= 0xA091;
pascal Handle TempNewHandle(Size logicalSize,OSErr *resultCode)
= {0x3F3C,0x001D,0xA88F};
pascal Size TempMaxMem(Size *grow)
= {0x3F3C,0x0015,0xA88F};
pascal long TempFreeMem(void)
= {0x3F3C,0x0018,0xA88F};
pascal void TempHLock(Handle h,OSErr *resultCode)
= {0x3F3C,0x001E,0xA88F};
pascal void TempHUnlock(Handle h,OSErr *resultCode)
= {0x3F3C,0x001F,0xA88F};
pascal void TempDisposeHandle(Handle h,OSErr *resultCode)
= {0x3F3C,0x0020,0xA88F};
pascal Ptr TempTopMem(void)
= {0x3F3C,0x0016,0xA88F};
pascal Size MFMaxMem(Size *grow)
= {0x3F3C,0x0015,0xA88F};
pascal long MFFreeMem(void)
= {0x3F3C,0x0018,0xA88F};
pascal Handle MFTempNewHandle(Size logicalSize,OSErr *resultCode)
= {0x3F3C,0x001D,0xA88F};
pascal void MFTempHLock(Handle h,OSErr *resultCode)
= {0x3F3C,0x001E,0xA88F};
pascal void MFTempHUnlock(Handle h,OSErr *resultCode)
= {0x3F3C,0x001F,0xA88F};
pascal void MFTempDisposHandle(Handle h,OSErr *resultCode)
= {0x3F3C,0x0020,0xA88F};
pascal Ptr MFTopMem(void)
= {0x3F3C,0x0016,0xA88F};
pascal void InitApplZone(void)
= 0xA02C;
pascal void InitZone(GrowZoneProcPtr pgrowZone,short cmoreMasters,void *limitPtr,
void *startPtr);
#pragma parameter SetZone(__A0)
pascal void SetZone(THz hz)
= 0xA01B;
#pragma parameter __D0 CompactMem(__D0)
pascal Size CompactMem(Size cbNeeded)
= 0xA04C;
#pragma parameter __D0 CompactMemSys(__D0)
pascal Size CompactMemSys(Size cbNeeded)
= 0xA44C;
#pragma parameter PurgeMem(__D0)
pascal void PurgeMem(Size cbNeeded)
= 0xA04D;
#pragma parameter PurgeMemSys(__D0)
pascal void PurgeMemSys(Size cbNeeded)
= 0xA44D;
#pragma parameter __D0 FreeMem
pascal long FreeMem(void)
= 0xA01C;
#pragma parameter __D0 FreeMemSys
pascal long FreeMemSys(void)
= 0xA41C;
#pragma parameter ResrvMem(__D0)
pascal void ResrvMem(Size cbNeeded)
= 0xA040;
#pragma parameter ReserveMem(__D0)
pascal void ReserveMem(Size cbNeeded)
= 0xA040;
#pragma parameter ReserveMemSys(__D0)
pascal void ReserveMemSys(Size cbNeeded)
= 0xA440;
#pragma parameter __D0 MaxMem(__A1)
pascal Size MaxMem(Size *grow)
= {0xA11D,0x2288};
#pragma parameter __D0 MaxMemSys(__A1)
pascal Size MaxMemSys(Size *grow)
= {0xA51D,0x2288};
#pragma parameter SetGrowZone(__A0)
pascal void SetGrowZone(GrowZoneProcPtr growZone)
= 0xA04B;
#pragma parameter SetApplLimit(__A0)
pascal void SetApplLimit(void *zoneLimit)
= 0xA02D;
#pragma parameter MoveHHi(__A0)
pascal void MoveHHi(Handle h)
= 0xA064;
#pragma parameter DisposPtr(__A0)
pascal void DisposPtr(Ptr p)
= 0xA01F;
#pragma parameter DisposePtr(__A0)
pascal void DisposePtr(Ptr p)
= 0xA01F;
pascal Size GetPtrSize(Ptr p);
#pragma parameter SetPtrSize(__A0,__D0)
pascal void SetPtrSize(Ptr p,Size newSize)
= 0xA020;
#pragma parameter DisposHandle(__A0)
pascal void DisposHandle(Handle h)
= 0xA023;
#pragma parameter DisposeHandle(__A0)
pascal void DisposeHandle(Handle h)
= 0xA023;
pascal Size GetHandleSize(Handle h);
#pragma parameter SetHandleSize(__A0,__D0)
pascal void SetHandleSize(Handle h,Size newSize)
= 0xA024;
#pragma parameter EmptyHandle(__A0)
pascal void EmptyHandle(Handle h)
= 0xA02B;
#pragma parameter ReallocHandle(__A0,__D0)
pascal void ReallocHandle(Handle h,Size byteCount)
= 0xA027;
#pragma parameter ReallocateHandle(__A0,__D0)
pascal void ReallocateHandle(Handle h,Size byteCount)
= 0xA027;
#pragma parameter HSetRBit(__A0)
pascal void HSetRBit(Handle h)
= 0xA067;
#pragma parameter HClrRBit(__A0)
pascal void HClrRBit(Handle h)
= 0xA068;
pascal void MoreMasters(void)
= 0xA036;
#pragma parameter BlockMove(__A0,__A1,__D0)
pascal void BlockMove(const void *srcPtr,void *destPtr,Size byteCount)
= 0xA02E;
pascal void PurgeSpace(long *total,long *contig);
#pragma parameter __D0 HGetState(__A0)
pascal char HGetState(Handle h)
= 0xA069;
#pragma parameter HSetState(__A0,__D0)
pascal void HSetState(Handle h,char flags)
= 0xA06A;
#pragma parameter SetApplBase(__A0)
pascal void SetApplBase(void *startPtr)
= 0xA057;
pascal void MaxApplZone(void)
= 0xA063;
#pragma parameter __D0 HoldMemory(__A0,__A1)
pascal OSErr HoldMemory(void *address,unsigned long count)
= {0x7000,0xA05C};
#pragma parameter __D0 UnholdMemory(__A0,__A1)
pascal OSErr UnholdMemory(void *address,unsigned long count)
= {0x7001,0xA05C};
#pragma parameter __D0 LockMemory(__A0,__A1)
pascal OSErr LockMemory(void *address,unsigned long count)
= {0x7002,0xA05C};
#pragma parameter __D0 LockMemoryContiguous(__A0,__A1)
pascal OSErr LockMemoryContiguous(void *address,unsigned long count)
= {0x7004,0xA05C};
#pragma parameter __D0 UnlockMemory(__A0,__A1)
pascal OSErr UnlockMemory(void *address,unsigned long count)
= {0x7003,0xA05C};
pascal OSErr GetPhysical(LogicalToPhysicalTable *addresses,unsigned long *physicalEntryCount);
#pragma parameter __D0 DeferUserFn(__A0,__D0)
pascal OSErr DeferUserFn(ProcPtr userFunction,void *argument)
= 0xA08F;
#pragma parameter __D0 DebuggerGetMax
pascal long DebuggerGetMax(void)
= {0x7000,0xA08D};
pascal void DebuggerEnter(void)
= {0x7001,0xA08D};
pascal void DebuggerExit(void)
= {0x7002,0xA08D};
pascal void DebuggerPoll(void)
= {0x7003,0xA08D};
#pragma parameter __D0 GetPageState(__A0)
pascal PageState GetPageState(const void *address)
= {0x7004,0xA08D};
#pragma parameter __D0 PageFaultFatal
pascal Boolean PageFaultFatal(void)
= {0x7005,0xA08D};
#pragma parameter __D0 DebuggerLockMemory(__A0,__A1)
pascal OSErr DebuggerLockMemory(void *address,unsigned long count)
= {0x7006,0xA08D};
#pragma parameter __D0 DebuggerUnlockMemory(__A0,__A1)
pascal OSErr DebuggerUnlockMemory(void *address,unsigned long count)
= {0x7007,0xA08D};
#pragma parameter __D0 EnterSupervisorMode
pascal StatusRegisterContents EnterSupervisorMode(void)
= {0x7008,0xA08D};
# 10 "console.c" 2
# 1 "OSEvents.h" 1
# 1 "OSUtils.h" 1
enum {
useFree = 0,
useATalk = 1,
useAsync = 2,
useExtClk = 3,
useMIDI = 4,
curSysEnvVers = 2,
envMac = -1,
envXL = -2,
envMachUnknown = 0,
env512KE = 1,
envMacPlus = 2,
envSE = 3,
envMacII = 4,
envMacIIx = 5,
envMacIIcx = 6,
envSE30 = 7,
envPortable = 8,
envMacIIci = 9,
envMacIIfx = 11,
envCPUUnknown = 0
};
enum {
env68000 = 1,
env68010 = 2,
env68020 = 3,
env68030 = 4,
env68040 = 5,
envUnknownKbd = 0,
envMacKbd = 1,
envMacAndPad = 2,
envMacPlusKbd = 3,
envAExtendKbd = 4,
envStandADBKbd = 5,
envPrtblADBKbd = 6,
envPrtblISOKbd = 7,
envStdISOADBKbd = 8,
envExtISOADBKbd = 9,
false32b = 0,
true32b = 1,
sortsBefore = -1,
sortsEqual = 0,
sortsAfter = 1
};
enum {dummyType,vType,ioQType,drvQType,evType,fsQType,sIQType,dtQType};
typedef unsigned short QTypes;
enum {OSTrap,ToolTrap};
typedef unsigned char TrapType;
struct SysParmType {
char valid;
char aTalkA;
char aTalkB;
char config;
short portA;
short portB;
long alarm;
short font;
short kbdPrint;
short volClik;
short misc;
};
typedef struct SysParmType SysParmType;
typedef SysParmType *SysPPtr;
struct QElem {
struct QElem *qLink;
short qType;
short qData[1];
};
typedef struct QElem QElem;
typedef QElem *QElemPtr;
struct QHdr {
short qFlags;
QElemPtr qHead;
QElemPtr qTail;
};
typedef struct QHdr QHdr;
typedef QHdr *QHdrPtr;
struct DateTimeRec {
short year;
short month;
short day;
short hour;
short minute;
short second;
short dayOfWeek;
};
typedef struct DateTimeRec DateTimeRec;
struct SysEnvRec {
short environsVersion;
short machineType;
short systemVersion;
short processor;
Boolean hasFPU;
Boolean hasColorQD;
short keyBoardType;
short atDrvrVersNum;
short sysVRefNum;
};
typedef struct SysEnvRec SysEnvRec;
pascal void SysBeep(short duration)
= 0xA9C8;
pascal long KeyTrans(const void *transData,short keycode,long *state)
= 0xA9C3;
#pragma parameter __D0 DTInstall(__A0)
pascal OSErr DTInstall(QElemPtr dtTaskPtr)
= 0xA082;
#pragma parameter SwapMMUMode(__A0)
pascal void SwapMMUMode(char *mode)
= {0x1010,0xA05D,0x1080};
pascal OSErr SysEnvirons(short versionRequested,SysEnvRec *theWorld);
#pragma parameter __D0 ReadDateTime(__A0)
pascal OSErr ReadDateTime(unsigned long *time)
= 0xA039;
#pragma parameter GetDateTime(__A0)
pascal void GetDateTime(unsigned long *secs)
= {0x20B8,0x020C};
#pragma parameter __D0 SetDateTime(__D0)
pascal OSErr SetDateTime(unsigned long time)
= 0xA03A;
#pragma parameter SetTime(__A0)
pascal void SetTime(const DateTimeRec *d)
= {0xA9C7,0xA03A};
#pragma parameter GetTime(__A0)
pascal void GetTime(DateTimeRec *d)
= {0x2038,0x020C,0xA9C6};
pascal void Date2Secs(const DateTimeRec *d,unsigned long *secs);
#pragma parameter Secs2Date(__D0,__A0)
pascal void Secs2Date(unsigned long secs,DateTimeRec *d)
= 0xA9C6;
#pragma parameter Delay(__A0,__A1)
pascal void Delay(long numTicks,long *finalTicks)
= {0xA03B,0x2280};
#pragma parameter __A0 GetTrapAddress(__D0)
pascal long GetTrapAddress(short trapNum)
= 0xA146;
#pragma parameter SetTrapAddress(__A0,__D0)
pascal void SetTrapAddress(long trapAddr,short trapNum)
= 0xA047;
pascal long NGetTrapAddress(short trapNum,TrapType tTyp);
pascal void NSetTrapAddress(long trapAddr,short trapNum,TrapType tTyp);
#pragma parameter __A0 GetOSTrapAddress(__D0)
pascal long GetOSTrapAddress(short trapNum)
= 0xA346;
#pragma parameter SetOSTrapAddress(__A0,__D0)
pascal void SetOSTrapAddress(long trapAddr,short trapNum)
= 0xA247;
#pragma parameter __A0 GetToolTrapAddress(__D0)
pascal long GetToolTrapAddress(short trapNum)
= 0xA746;
#pragma parameter SetToolTrapAddress(__A0,__D0)
pascal void SetToolTrapAddress(long trapAddr,short trapNum)
= 0xA647;
#pragma parameter __A0 GetToolboxTrapAddress(__D0)
pascal long GetToolboxTrapAddress(short trapNum)
= 0xA746;
#pragma parameter SetToolboxTrapAddress(__A0,__D0)
pascal void SetToolboxTrapAddress(long trapAddr,short trapNum)
= 0xA647;
pascal OSErr WriteParam(void);
pascal Boolean EqualString(ConstStr255Param str1,ConstStr255Param str2,
Boolean caseSens,Boolean diacSens);
Boolean equalstring(char *str1,char *str2,Boolean caseSens,Boolean diacSens);
pascal void UprString(Str255 theString,Boolean diacSens);
void uprstring(char *theString,Boolean diacSens);
#pragma parameter Enqueue(__A0,__A1)
pascal void Enqueue(QElemPtr qElement,QHdrPtr qHeader)
= 0xA96F;
#pragma parameter __D0 Dequeue(__A0,__A1)
pascal OSErr Dequeue(QElemPtr qElement,QHdrPtr qHeader)
= 0xA96E;
long SetCurrentA5(void)
= {0x200D,0x2A78,0x0904};
#pragma parameter __D0 SetA5(__D0)
long SetA5(long newA5)
= 0xC18D;
pascal void Environs(short *rom,short *machine);
pascal short RelString(ConstStr255Param str1,ConstStr255Param str2,Boolean caseSens,
Boolean diacSens);
short relstring(char *str1,char *str2,Boolean caseSens,Boolean diacSens);
pascal OSErr HandToHand(Handle *theHndl);
#pragma parameter __D0 PtrToXHand(__A0,__A1,__D0)
pascal OSErr PtrToXHand(const void *srcPtr,Handle dstHndl,long size)
= 0xA9E2;
pascal OSErr PtrToHand(const void *srcPtr,Handle *dstHndl,long size);
#pragma parameter __D0 HandAndHand(__A0,__A1)
pascal OSErr HandAndHand(Handle hand1,Handle hand2)
= 0xA9E4;
#pragma parameter __D0 PtrAndHand(__A0,__A1,__D0)
pascal OSErr PtrAndHand(const void *ptr1,Handle hand2,long size)
= 0xA9EF;
#pragma parameter __D0 InitUtil
pascal OSErr InitUtil(void)
= 0xA03F;
pascal Boolean SwapInstructionCache(Boolean cacheEnable);
pascal void FlushInstructionCache(void);
pascal Boolean SwapDataCache(Boolean cacheEnable);
pascal void FlushDataCache(void);
# 26 "OSEvents.h" 2
struct EvQEl {
QElemPtr qLink;
short qType;
short evtQWhat;
long evtQMessage;
long evtQWhen;
Point evtQWhere;
short evtQModifiers;
};
typedef struct EvQEl EvQEl;
typedef EvQEl *EvQElPtr;
#pragma parameter __D0 PostEvent(__A0,__D0)
pascal OSErr PostEvent(short eventNum,long eventMsg)
= 0xA02F;
#pragma parameter __D0 PPostEvent(__A0,__D0,__A1)
pascal OSErr PPostEvent(short eventCode,long eventMsg,EvQElPtr *qEl)
= {0xA12F,0x2288};
#pragma parameter __D0 OSEventAvail(__D0,__A0)
pascal Boolean OSEventAvail(short mask,EventRecord *theEvent)
= {0xA030,0x5240};
#pragma parameter __D0 GetOSEvent(__D0,__A0)
pascal Boolean GetOSEvent(short mask,EventRecord *theEvent)
= {0xA031,0x5240};
pascal void FlushEvents(short whichMask,short stopMask)
= {0x201F,0xA032};
#pragma parameter SetEventMask(__D0)
pascal void SetEventMask(short theMask)
= {0x31C0,0x0144};
# 11 "console.c" 2
# 1 "ToolUtils.h" 1
enum {
sysPatListID = 0,
iBeamCursor = 1,
crossCursor = 2,
plusCursor = 3,
watchCursor = 4
};
struct Int64Bit {
long hiLong;
long loLong;
};
typedef struct Int64Bit Int64Bit;
pascal Fixed FixRatio(short numer,short denom)
= 0xA869;
pascal Fixed FixMul(Fixed a,Fixed b)
= 0xA868;
pascal short FixRound(Fixed x)
= 0xA86C;
pascal StringHandle GetString(short stringID)
= 0xA9BA;
pascal long Munger(Handle h,long offset,const void *ptr1,long len1,const void *ptr2,
long len2)
= 0xA9E0;
pascal void PackBits(Ptr *srcPtr,Ptr *dstPtr,short srcBytes)
= 0xA8CF;
pascal void UnpackBits(Ptr *srcPtr,Ptr *dstPtr,short dstBytes)
= 0xA8D0;
pascal Boolean BitTst(const void *bytePtr,long bitNum)
= 0xA85D;
pascal void BitSet(void *bytePtr,long bitNum)
= 0xA85E;
pascal void BitClr(void *bytePtr,long bitNum)
= 0xA85F;
pascal long BitAnd(long value1,long value2)
= 0xA858;
pascal long BitOr(long value1,long value2)
= 0xA85B;
pascal long BitXor(long value1,long value2)
= 0xA859;
pascal long BitNot(long value)
= 0xA85A;
pascal long BitShift(long value,short count)
= 0xA85C;
pascal short HiWord(long x)
= 0xA86A;
pascal short LoWord(long x)
= 0xA86B;
pascal void LongMul(long a,long b,Int64Bit *result)
= 0xA867;
pascal Handle GetIcon(short iconID)
= 0xA9BB;
pascal void PlotIcon(const Rect *theRect,Handle theIcon)
= 0xA94B;
pascal PatHandle GetPattern(short patternID)
= 0xA9B8;
pascal CursHandle GetCursor(short cursorID)
= 0xA9B9;
pascal PicHandle GetPicture(short pictureID)
= 0xA9BC;
pascal Fixed SlopeFromAngle(short angle)
= 0xA8BC;
pascal short AngleFromSlope(Fixed slope)
= 0xA8C4;
StringHandle newstring(char *theString);
pascal void SetString(StringHandle theString,ConstStr255Param strNew)
= 0xA907;
pascal long DeltaPoint(Point ptA,Point ptB)
= 0xA94F;
pascal StringHandle NewString(ConstStr255Param theString)
= 0xA906;
pascal void ShieldCursor(const Rect *shieldRect,Point offsetPt)
= 0xA855;
pascal void GetIndString(Str255 theString,short strListID,short index);
void getindstring(char *theString,short strListID,short index);
pascal void ScreenRes(short *scrnHRes,short *scrnVRes)
= {0x225F,0x32B8,0x0102,0x225F,0x32B8,0x0104};
pascal void GetIndPattern(Pattern thePat,short patternListID,short index);
void setstring(StringHandle theString,char *strNew);
void shieldcursor(const Rect *shieldRect,Point *offsetPt);
long deltapoint(Point *ptA,Point *ptB);
# 12 "console.c" 2
# 1 "SegLoad.h" 1
enum {
appOpen = 0,
appPrint = 1
};
struct AppFile {
short vRefNum;
OSType fType;
short versNum;
Str255 fName;
};
typedef struct AppFile AppFile;
pascal void UnloadSeg(void * routineAddr)
= 0xA9F1;
pascal void ExitToShell(void)
= 0xA9F4;
pascal void GetAppParms(Str255 apName,short *apRefNum,Handle *apParam)
= 0xA9F5;
pascal void CountAppFiles(short *message,short *count);
pascal void GetAppFiles(short index,AppFile *theFile);
pascal void ClrAppFiles(short index);
void getappparms(char *apName,short *apRefNum,Handle *apParam);
# 13 "console.c" 2
# 1 "Windows.h" 1
# 1 "Controls.h" 1
enum {
pushButProc = 0,
checkBoxProc = 1,
radioButProc = 2,
useWFont = 8,
scrollBarProc = 16,
inButton = 10,
inCheckBox = 11,
inUpButton = 20,
inDownButton = 21,
inPageUp = 22,
inPageDown = 23,
inThumb = 129,
popupMenuProc = 1008,
inLabel = 1,
inMenu = 2,
inTriangle = 4
};
enum { popupFixedWidth = 1 << 0, popupReserved = 1 << 1, popupUseAddResMenu = 1 << 2,
popupUseWFont = 1 << 3};
enum { popupTitleBold = 1 << 8, popupTitleItalic = 1 << 9, popupTitleUnderline = 1 << 10,
popupTitleOutline = 1 << 11, popupTitleShadow = 1 << 12, popupTitleCondense = 1 << 13,
popupTitleExtend = 1 << 14, popupTitleNoStyle = 1 << 15};
enum {
popupTitleLeftJust = 0x00000000,
popupTitleCenterJust = 0x00000001,
popupTitleRightJust = 0x000000FF,
noConstraint = 0,
hAxisOnly = 1,
vAxisOnly = 2,
drawCntl = 0,
testCntl = 1,
calcCRgns = 2,
initCntl = 3,
dispCntl = 4,
posCntl = 5,
thumbCntl = 6,
dragCntl = 7,
autoTrack = 8,
calcCntlRgn = 10,
calcThumbRgn = 11,
cFrameColor = 0,
cBodyColor = 1,
cTextColor = 2
};
enum {
cThumbColor = 3
};
struct ControlRecord {
struct ControlRecord **nextControl;
WindowPtr contrlOwner;
Rect contrlRect;
unsigned char contrlVis;
unsigned char contrlHilite;
short contrlValue;
short contrlMin;
short contrlMax;
Handle contrlDefProc;
Handle contrlData;
ProcPtr contrlAction;
long contrlRfCon;
Str255 contrlTitle;
};
typedef struct ControlRecord ControlRecord;
typedef ControlRecord *ControlPtr, **ControlHandle;
struct CtlCTab {
long ccSeed;
short ccRider;
short ctSize;
ColorSpec ctTable[4];
};
typedef struct CtlCTab CtlCTab;
typedef CtlCTab *CCTabPtr, **CCTabHandle;
struct AuxCtlRec {
Handle acNext;
ControlHandle acOwner;
CCTabHandle acCTable;
short acFlags;
long acReserved;
long acRefCon;
};
typedef struct AuxCtlRec AuxCtlRec;
typedef AuxCtlRec *AuxCtlPtr, **AuxCtlHandle;
pascal ControlHandle NewControl(WindowPtr theWindow,const Rect *boundsRect,
ConstStr255Param title,Boolean visible,short value,short min,short max,
short procID,long refCon)
= 0xA954;
pascal void SetCTitle(ControlHandle theControl,ConstStr255Param title)
= 0xA95F;
pascal void GetCTitle(ControlHandle theControl,Str255 title)
= 0xA95E;
pascal ControlHandle GetNewControl(short controlID,WindowPtr owner)
= 0xA9BE;
pascal void DisposeControl(ControlHandle theControl)
= 0xA955;
pascal void KillControls(WindowPtr theWindow)
= 0xA956;
pascal void HideControl(ControlHandle theControl)
= 0xA958;
pascal void ShowControl(ControlHandle theControl)
= 0xA957;
pascal void DrawControls(WindowPtr theWindow)
= 0xA969;
pascal void Draw1Control(ControlHandle theControl)
= 0xA96D;
pascal void HiliteControl(ControlHandle theControl,short hiliteState)
= 0xA95D;
pascal void UpdtControl(WindowPtr theWindow,RgnHandle updateRgn)
= 0xA953;
pascal void UpdateControls(WindowPtr theWindow,RgnHandle updateRgn)
= 0xA953;
pascal void MoveControl(ControlHandle theControl,short h,short v)
= 0xA959;
pascal void SizeControl(ControlHandle theControl,short w,short h)
= 0xA95C;
pascal void SetCtlValue(ControlHandle theControl,short theValue)
= 0xA963;
pascal short GetCtlValue(ControlHandle theControl)
= 0xA960;
pascal void SetCtlMin(ControlHandle theControl,short minValue)
= 0xA964;
pascal short GetCtlMin(ControlHandle theControl)
= 0xA961;
pascal void SetCtlMax(ControlHandle theControl,short maxValue)
= 0xA965;
pascal short GetCtlMax(ControlHandle theControl)
= 0xA962;
pascal void SetCRefCon(ControlHandle theControl,long data)
= 0xA95B;
pascal long GetCRefCon(ControlHandle theControl)
= 0xA95A;
pascal void SetCtlAction(ControlHandle theControl,ProcPtr actionProc)
= 0xA96B;
pascal ProcPtr GetCtlAction(ControlHandle theControl)
= 0xA96A;
pascal void DragControl(ControlHandle theControl,Point startPt,const Rect *limitRect,
const Rect *slopRect,short axis)
= 0xA967;
pascal short TestControl(ControlHandle theControl,Point thePt)
= 0xA966;
pascal short TrackControl(ControlHandle theControl,Point thePoint,ProcPtr actionProc)
= 0xA968;
pascal short FindControl(Point thePoint,WindowPtr theWindow,ControlHandle *theControl)
= 0xA96C;
pascal void SetCtlColor(ControlHandle theControl,CCTabHandle newColorTable)
= 0xAA43;
pascal Boolean GetAuxCtl(ControlHandle theControl,AuxCtlHandle *acHndl)
= 0xAA44;
pascal short GetCVariant(ControlHandle theControl)
= 0xA809;
void dragcontrol(ControlHandle theControl,Point *startPt,const Rect *limitRect,
const Rect *slopRect,short axis);
ControlHandle newcontrol(WindowPtr theWindow,const Rect *boundsRect,char *title,
Boolean visible,short value,short min,short max,short procID,long refCon);
short findcontrol(Point *thePoint,WindowPtr theWindow,ControlHandle *theControl);
void getctitle(ControlHandle theControl,char *title);
void setctitle(ControlHandle theControl,char *title);
short trackcontrol(ControlHandle theControl,Point *thePoint,ProcPtr actionProc);
short testcontrol(ControlHandle theControl,Point *thePt);
# 26 "Windows.h" 2
enum {
documentProc = 0,
dBoxProc = 1,
plainDBox = 2,
altDBoxProc = 3,
noGrowDocProc = 4,
movableDBoxProc = 5,
zoomDocProc = 8,
zoomNoGrow = 12,
rDocProc = 16,
dialogKind = 2,
userKind = 8,
inDesk = 0,
inMenuBar = 1,
inSysWindow = 2,
inContent = 3,
inDrag = 4,
inGrow = 5,
inGoAway = 6,
inZoomIn = 7,
inZoomOut = 8
};
enum {
wDraw = 0,
wHit = 1,
wCalcRgns = 2,
wNew = 3,
wDispose = 4,
wGrow = 5,
wDrawGIcon = 6,
wNoHit = 0,
wInContent = 1,
wInDrag = 2,
wInGrow = 3,
wInGoAway = 4,
wInZoomIn = 5,
wInZoomOut = 6,
deskPatID = 16,
wContentColor = 0,
wFrameColor = 1,
wTextColor = 2,
wHiliteColor = 3,
wTitleBarColor = 4
};
typedef pascal void (*DragGrayRgnProcPtr)(void);
struct WindowRecord {
GrafPort port;
short windowKind;
Boolean visible;
Boolean hilited;
Boolean goAwayFlag;
Boolean spareFlag;
RgnHandle strucRgn;
RgnHandle contRgn;
RgnHandle updateRgn;
Handle windowDefProc;
Handle dataHandle;
StringHandle titleHandle;
short titleWidth;
ControlHandle controlList;
struct WindowRecord *nextWindow;
PicHandle windowPic;
long refCon;
};
typedef struct WindowRecord WindowRecord;
typedef WindowRecord *WindowPeek;
struct CWindowRecord {
CGrafPort port;
short windowKind;
Boolean visible;
Boolean hilited;
Boolean goAwayFlag;
Boolean spareFlag;
RgnHandle strucRgn;
RgnHandle contRgn;
RgnHandle updateRgn;
Handle windowDefProc;
Handle dataHandle;
StringHandle titleHandle;
short titleWidth;
ControlHandle controlList;
struct CWindowRecord *nextWindow;
PicHandle windowPic;
long refCon;
};
typedef struct CWindowRecord CWindowRecord;
typedef CWindowRecord *CWindowPeek;
struct WStateData {
Rect userState;
Rect stdState;
};
typedef struct WStateData WStateData;
typedef WStateData *WStateDataPtr, **WStateDataHandle;
struct AuxWinRec {
struct AuxWinRec **awNext;
WindowPtr awOwner;
CTabHandle awCTable;
Handle dialogCItem;
long awFlags;
CTabHandle awReserved;
long awRefCon;
};
typedef struct AuxWinRec AuxWinRec;
typedef AuxWinRec *AuxWinPtr, **AuxWinHandle;
struct WinCTab {
long wCSeed;
short wCReserved;
short ctSize;
ColorSpec ctTable[5];
};
typedef struct WinCTab WinCTab;
typedef WinCTab *WCTabPtr, **WCTabHandle;
pascal void InitWindows(void)
= 0xA912;
pascal void GetWMgrPort(GrafPtr *wPort)
= 0xA910;
pascal WindowPtr NewWindow(void *wStorage,const Rect *boundsRect,ConstStr255Param title,
Boolean visible,short theProc,WindowPtr behind,Boolean goAwayFlag,long refCon)
= 0xA913;
pascal WindowPtr GetNewWindow(short windowID,void *wStorage,WindowPtr behind)
= 0xA9BD;
pascal void CloseWindow(WindowPtr theWindow)
= 0xA92D;
pascal void DisposeWindow(WindowPtr theWindow)
= 0xA914;
void setwtitle(WindowPtr theWindow,char *title);
pascal void GetWTitle(WindowPtr theWindow,Str255 title)
= 0xA919;
pascal void SelectWindow(WindowPtr theWindow)
= 0xA91F;
pascal void HideWindow(WindowPtr theWindow)
= 0xA916;
pascal void ShowWindow(WindowPtr theWindow)
= 0xA915;
pascal void ShowHide(WindowPtr theWindow,Boolean showFlag)
= 0xA908;
pascal void HiliteWindow(WindowPtr theWindow,Boolean fHilite)
= 0xA91C;
pascal void BringToFront(WindowPtr theWindow)
= 0xA920;
pascal void SendBehind(WindowPtr theWindow,WindowPtr behindWindow)
= 0xA921;
pascal WindowPtr FrontWindow(void)
= 0xA924;
pascal void DrawGrowIcon(WindowPtr theWindow)
= 0xA904;
pascal void MoveWindow(WindowPtr theWindow,short hGlobal,short vGlobal,
Boolean front)
= 0xA91B;
pascal void SizeWindow(WindowPtr theWindow,short w,short h,Boolean fUpdate)
= 0xA91D;
pascal void ZoomWindow(WindowPtr theWindow,short partCode,Boolean front)
= 0xA83A;
pascal void InvalRect(const Rect *badRect)
= 0xA928;
pascal void InvalRgn(RgnHandle badRgn)
= 0xA927;
pascal void ValidRect(const Rect *goodRect)
= 0xA92A;
pascal void ValidRgn(RgnHandle goodRgn)
= 0xA929;
pascal void BeginUpdate(WindowPtr theWindow)
= 0xA922;
pascal void EndUpdate(WindowPtr theWindow)
= 0xA923;
pascal void SetWRefCon(WindowPtr theWindow,long data)
= 0xA918;
pascal long GetWRefCon(WindowPtr theWindow)
= 0xA917;
pascal void SetWindowPic(WindowPtr theWindow,PicHandle pic)
= 0xA92E;
pascal PicHandle GetWindowPic(WindowPtr theWindow)
= 0xA92F;
pascal Boolean CheckUpdate(EventRecord *theEvent)
= 0xA911;
pascal void ClipAbove(WindowPeek window)
= 0xA90B;
pascal void SaveOld(WindowPeek window)
= 0xA90E;
pascal void DrawNew(WindowPeek window,Boolean update)
= 0xA90F;
pascal void PaintOne(WindowPeek window,RgnHandle clobberedRgn)
= 0xA90C;
pascal void PaintBehind(WindowPeek startWindow,RgnHandle clobberedRgn)
= 0xA90D;
pascal void CalcVis(WindowPeek window)
= 0xA909;
pascal void CalcVisBehind(WindowPeek startWindow,RgnHandle clobberedRgn)
= 0xA90A;
pascal long GrowWindow(WindowPtr theWindow,Point startPt,const Rect *bBox)
= 0xA92B;
Boolean trackgoaway(WindowPtr theWindow,Point *thePt);
pascal short FindWindow(Point thePoint,WindowPtr *theWindow)
= 0xA92C;
short findwindow(Point *thePoint,WindowPtr *theWindow);
pascal long PinRect(const Rect *theRect,Point thePt)
= 0xA94E;
pascal long DragGrayRgn(RgnHandle theRgn,Point startPt,const Rect *boundsRect,
const Rect *slopRect,short axis,DragGrayRgnProcPtr actionProc)
= 0xA905;
pascal Boolean TrackBox(WindowPtr theWindow,Point thePt,short partCode)
= 0xA83B;
pascal void GetCWMgrPort(CGrafPtr *wMgrCPort)
= 0xAA48;
void getwtitle(WindowPtr theWindow,char *title);
pascal void SetWinColor(WindowPtr theWindow,WCTabHandle newColorTable)
= 0xAA41;
pascal Boolean GetAuxWin(WindowPtr theWindow,AuxWinHandle *awHndl)
= 0xAA42;
long growwindow(WindowPtr theWindow,Point *startPt,const Rect *bBox);
pascal void SetDeskCPat(PixPatHandle deskPixPat)
= 0xAA47;
WindowPtr newwindow(void *wStorage,const Rect *boundsRect,char *title,Boolean visible,
short theProc,WindowPtr behind,Boolean goAwayFlag,long refCon);
pascal WindowPtr NewCWindow(void *wStorage,const Rect *boundsRect,ConstStr255Param title,
Boolean visible,short procID,WindowPtr behind,Boolean goAwayFlag,long refCon)
= 0xAA45;
WindowPtr newcwindow(void *wStorage,const Rect *boundsRect,char *title,
Boolean visible,short procID,WindowPtr behind,Boolean goAwayFlag,long refCon);
pascal WindowPtr GetNewCWindow(short windowID,void *wStorage,WindowPtr behind)
= 0xAA46;
pascal short GetWVariant(WindowPtr theWindow)
= 0xA80A;
long pinrect(const Rect *theRect,Point *thePt);
pascal void SetWTitle(WindowPtr theWindow,ConstStr255Param title)
= 0xA91A;
Boolean trackbox(WindowPtr theWindow,Point *thePt,short partCode);
pascal Boolean TrackGoAway(WindowPtr theWindow,Point thePt)
= 0xA91E;
pascal void DragWindow(WindowPtr theWindow,Point startPt,const Rect *boundsRect)
= 0xA925;
long draggrayrgn(RgnHandle theRgn,Point *startPt,const Rect *boundsRect,
const Rect *slopRect,short axis,DragGrayRgnProcPtr actionProc);
void dragwindow(WindowPtr theWindow,Point *startPt,const Rect *boundsRect);
# 14 "console.c" 2
# 1 "Dialogs.h" 1
# 1 "TextEdit.h" 1
enum {
teJustLeft = 0,
teJustCenter = 1,
teJustRight = -1,
teForceLeft = -2,
teFlushDefault = 0,
teCenter = 1,
teFlushRight = -1,
teFlushLeft = -2,
fontBit = 0,
faceBit = 1,
sizeBit = 2,
clrBit = 3,
addSizeBit = 4,
toglBit = 5,
doFont = 1,
doFace = 2,
doSize = 4,
doColor = 8,
doAll = 15,
addSize = 16
};
enum {
doToggle = 32,
EOLHook = 0,
DRAWHook = 4,
WIDTHHook = 8,
HITTESTHook = 12,
nWIDTHHook = 24,
TextWidthHook = 28,
intEOLHook = 0,
intDrawHook = 1,
intWidthHook = 2,
intHitTestHook = 3,
intNWidthHook = 6,
intTextWidthHook = 7,
teFAutoScr = 0,
teFTextBuffering = 1,
teFOutlineHilite = 2,
teFInlineInput = 3,
teFUseTextServices = 4,
TEBitClear = 0,
TEBitSet = 1
};
enum {
TEBitTest = -1,
teWordSelect = 4,
teWordDrag = 8,
teFromFind = 12,
teFromRecal = 16
};
typedef pascal Boolean (*WordBreakProcPtr)(Ptr text, short charPos);
typedef pascal Boolean (*ClikLoopProcPtr)(void);
struct TERec {
Rect destRect;
Rect viewRect;
Rect selRect;
short lineHeight;
short fontAscent;
Point selPoint;
short selStart;
short selEnd;
short active;
WordBreakProcPtr wordBreak;
ClikLoopProcPtr clikLoop;
long clickTime;
short clickLoc;
long caretTime;
short caretState;
short just;
short teLength;
Handle hText;
short recalBack;
short recalLines;
short clikStuff;
short crOnly;
short txFont;
Style txFace;
char filler;
short txMode;
short txSize;
GrafPtr inPort;
ProcPtr highHook;
ProcPtr caretHook;
short nLines;
short lineStarts[16001];
};
typedef struct TERec TERec;
typedef TERec *TEPtr, **TEHandle;
typedef char Chars[32001];
typedef char *CharsPtr,**CharsHandle;
struct StyleRun {
short startChar;
short styleIndex;
};
typedef struct StyleRun StyleRun;
struct STElement {
short stCount;
short stHeight;
short stAscent;
short stFont;
Style stFace;
char filler;
short stSize;
RGBColor stColor;
};
typedef struct STElement STElement;
typedef STElement TEStyleTable[1777], *STPtr, **STHandle;
struct LHElement {
short lhHeight;
short lhAscent;
};
typedef struct LHElement LHElement;
typedef LHElement LHTable[8001], *LHPtr, **LHHandle;
struct ScrpSTElement {
long scrpStartChar;
short scrpHeight;
short scrpAscent;
short scrpFont;
Style scrpFace;
char filler;
short scrpSize;
RGBColor scrpColor;
};
typedef struct ScrpSTElement ScrpSTElement;
typedef ScrpSTElement ScrpSTTable[1601];
struct StScrpRec {
short scrpNStyles;
ScrpSTTable scrpStyleTab;
};
typedef struct StScrpRec StScrpRec;
typedef StScrpRec *StScrpPtr, **StScrpHandle;
struct NullStRec {
long teReserved;
StScrpHandle nullScrap;
};
typedef struct NullStRec NullStRec;
typedef NullStRec *NullStPtr, **NullStHandle;
struct TEStyleRec {
short nRuns;
short nStyles;
STHandle styleTab;
LHHandle lhTab;
long teRefCon;
NullStHandle nullStyle;
StyleRun runs[8001];
};
typedef struct TEStyleRec TEStyleRec;
typedef TEStyleRec *TEStylePtr, **TEStyleHandle;
struct TextStyle {
short tsFont;
Style tsFace;
char filler;
short tsSize;
RGBColor tsColor;
};
typedef struct TextStyle TextStyle;
typedef TextStyle *TextStylePtr, **TextStyleHandle;
typedef short TEIntHook;
pascal void TEInit(void)
= 0xA9CC;
pascal TEHandle TENew(const Rect *destRect,const Rect *viewRect)
= 0xA9D2;
pascal void TEDispose(TEHandle hTE)
= 0xA9CD;
pascal void TESetText(const void *text,long length,TEHandle hTE)
= 0xA9CF;
pascal CharsHandle TEGetText(TEHandle hTE)
= 0xA9CB;
pascal void TEIdle(TEHandle hTE)
= 0xA9DA;
pascal void TESetSelect(long selStart,long selEnd,TEHandle hTE)
= 0xA9D1;
pascal void TEActivate(TEHandle hTE)
= 0xA9D8;
pascal void TEDeactivate(TEHandle hTE)
= 0xA9D9;
pascal void TEKey(short key,TEHandle hTE)
= 0xA9DC;
pascal void TECut(TEHandle hTE)
= 0xA9D6;
pascal void TECopy(TEHandle hTE)
= 0xA9D5;
pascal void TEPaste(TEHandle hTE)
= 0xA9DB;
pascal void TEDelete(TEHandle hTE)
= 0xA9D7;
pascal void TEInsert(const void *text,long length,TEHandle hTE)
= 0xA9DE;
pascal void TESetJust(short just,TEHandle hTE)
= 0xA9DF;
pascal void TEUpdate(const Rect *rUpdate,TEHandle hTE)
= 0xA9D3;
pascal void TextBox(const void *text,long length,const Rect *box,short just)
= 0xA9CE;
pascal void TEScroll(short dh,short dv,TEHandle hTE)
= 0xA9DD;
pascal void TESelView(TEHandle hTE)
= 0xA811;
pascal void TEPinScroll(short dh,short dv,TEHandle hTE)
= 0xA812;
pascal void TEAutoView(Boolean fAuto,TEHandle hTE)
= 0xA813;
pascal void TECalText(TEHandle hTE)
= 0xA9D0;
pascal short TEGetOffset(Point pt,TEHandle hTE)
= 0xA83C;
pascal Point TEGetPoint(short offset,TEHandle hTE)
= {0x3F3C,0x0008,0xA83D};
pascal void TEClick(Point pt,Boolean fExtend,TEHandle h)
= 0xA9D4;
pascal TEHandle TEStylNew(const Rect *destRect,const Rect *viewRect)
= 0xA83E;
pascal TEHandle TEStyleNew(const Rect *destRect,const Rect *viewRect)
= 0xA83E;
pascal void SetStylHandle(TEStyleHandle theHandle,TEHandle hTE)
= {0x3F3C,0x0005,0xA83D};
pascal void SetStyleHandle(TEStyleHandle theHandle,TEHandle hTE)
= {0x3F3C,0x0005,0xA83D};
pascal TEStyleHandle GetStylHandle(TEHandle hTE)
= {0x3F3C,0x0004,0xA83D};
pascal TEStyleHandle GetStyleHandle(TEHandle hTE)
= {0x3F3C,0x0004,0xA83D};
pascal void TEGetStyle(short offset,TextStyle *theStyle,short *lineHeight,
short *fontAscent,TEHandle hTE)
= {0x3F3C,0x0003,0xA83D};
pascal void TEStylPaste(TEHandle hTE)
= {0x3F3C,0x0000,0xA83D};
pascal void TEStylePaste(TEHandle hTE)
= {0x3F3C,0x0000,0xA83D};
pascal void TESetStyle(short mode,const TextStyle *newStyle,Boolean redraw,
TEHandle hTE)
= {0x3F3C,0x0001,0xA83D};
pascal void TEReplaceStyle(short mode,const TextStyle *oldStyle,const TextStyle *newStyle,
Boolean redraw,TEHandle hTE)
= {0x3F3C,0x0002,0xA83D};
pascal StScrpHandle GetStylScrap(TEHandle hTE)
= {0x3F3C,0x0006,0xA83D};
pascal StScrpHandle GetStyleScrap(TEHandle hTE)
= {0x3F3C,0x0006,0xA83D};
pascal void TEStylInsert(const void *text,long length,StScrpHandle hST,
TEHandle hTE)
= {0x3F3C,0x0007,0xA83D};
pascal void TEStyleInsert(const void *text,long length,StScrpHandle hST,
TEHandle hTE)
= {0x3F3C,0x0007,0xA83D};
pascal long TEGetHeight(long endLine,long startLine,TEHandle hTE)
= {0x3F3C,0x0009,0xA83D};
pascal Boolean TEContinuousStyle(short *mode,TextStyle *aStyle,TEHandle hTE)
= {0x3F3C,0x000A,0xA83D};
pascal void SetStylScrap(long rangeStart,long rangeEnd,StScrpHandle newStyles,
Boolean redraw,TEHandle hTE)
= {0x3F3C,0x000B,0xA83D};
pascal void SetStyleScrap(long rangeStart,long rangeEnd,StScrpHandle newStyles,
Boolean redraw,TEHandle hTE)
= {0x3F3C,0x000B,0xA83D};
pascal void TECustomHook(TEIntHook which,ProcPtr *addr,TEHandle hTE)
= {0x3F3C,0x000C,0xA83D};
pascal long TENumStyles(long rangeStart,long rangeEnd,TEHandle hTE)
= {0x3F3C,0x000D,0xA83D};
pascal short TEFeatureFlag(short feature,short action,TEHandle hTE)
= {0x3F3C,0x000E,0xA83D};
pascal void TESetScrapLen(long length);
pascal OSErr TEFromScrap(void);
pascal OSErr TEToScrap(void);
pascal void SetClikLoop(ClikLoopProcPtr clikProc,TEHandle hTE);
pascal void SetWordBreak(WordBreakProcPtr wBrkProc,TEHandle hTE);
void teclick(Point *pt,Boolean fExtend,TEHandle h);
# 23 "Dialogs.h" 2
enum {
ctrlItem = 4,
btnCtrl = 0,
chkCtrl = 1,
radCtrl = 2,
resCtrl = 3,
statText = 8,
editText = 16,
iconItem = 32,
picItem = 64,
userItem = 0,
itemDisable = 128,
ok = 1,
cancel = 2,
stopIcon = 0,
noteIcon = 1,
cautionIcon = 2
};
typedef short DITLMethod;
enum {
overlayDITL = 0,
appendDITLRight = 1,
appendDITLBottom = 2
};
typedef short StageList;
typedef WindowPtr DialogPtr;
typedef pascal void (*ResumeProcPtr)(void);
typedef pascal void (*SoundProcPtr)(void);
typedef pascal Boolean (*ModalFilterProcPtr)(DialogPtr theDialog, EventRecord *theEvent, short *itemHit);
struct DialogRecord {
WindowRecord window;
Handle items;
TEHandle textH;
short editField;
short editOpen;
short aDefItem;
};
typedef struct DialogRecord DialogRecord;
typedef DialogRecord *DialogPeek;
struct DialogTemplate {
Rect boundsRect;
short procID;
Boolean visible;
Boolean filler1;
Boolean goAwayFlag;
Boolean filler2;
long refCon;
short itemsID;
Str255 title;
};
typedef struct DialogTemplate DialogTemplate;
typedef DialogTemplate *DialogTPtr, **DialogTHndl;
struct AlertTemplate {
Rect boundsRect;
short itemsID;
StageList stages;
};
typedef struct AlertTemplate AlertTemplate;
typedef AlertTemplate *AlertTPtr, **AlertTHndl;
pascal void InitDialogs(ResumeProcPtr resumeProc)
= 0xA97B;
pascal void ErrorSound(SoundProcPtr soundProc)
= 0xA98C;
pascal DialogPtr NewDialog(void *wStorage,const Rect *boundsRect,ConstStr255Param title,
Boolean visible,short procID,WindowPtr behind,Boolean goAwayFlag,long refCon,
Handle itmLstHndl)
= 0xA97D;
DialogPtr newdialog(void *wStorage,const Rect *boundsRect,char *title,Boolean visible,
short procID,WindowPtr behind,Boolean goAwayFlag,long refCon,Handle itmLstHndl);
pascal DialogPtr GetNewDialog(short dialogID,void *dStorage,WindowPtr behind)
= 0xA97C;
pascal void CloseDialog(DialogPtr theDialog)
= 0xA982;
pascal void DisposDialog(DialogPtr theDialog)
= 0xA983;
pascal void DisposeDialog(DialogPtr theDialog)
= 0xA983;
pascal void CouldDialog(short dialogID)
= 0xA979;
pascal void FreeDialog(short dialogID)
= 0xA97A;
pascal void ParamText(ConstStr255Param param0,ConstStr255Param param1,ConstStr255Param param2,
ConstStr255Param param3)
= 0xA98B;
pascal void ModalDialog(ModalFilterProcPtr filterProc,short *itemHit)
= 0xA991;
pascal Boolean IsDialogEvent(const EventRecord *theEvent)
= 0xA97F;
pascal Boolean DialogSelect(const EventRecord *theEvent,DialogPtr *theDialog,
short *itemHit)
= 0xA980;
pascal void DrawDialog(DialogPtr theDialog)
= 0xA981;
pascal void UpdtDialog(DialogPtr theDialog,RgnHandle updateRgn)
= 0xA978;
pascal void UpdateDialog(DialogPtr theDialog,RgnHandle updateRgn)
= 0xA978;
pascal short Alert(short alertID,ModalFilterProcPtr filterProc)
= 0xA985;
pascal short StopAlert(short alertID,ModalFilterProcPtr filterProc)
= 0xA986;
pascal short NoteAlert(short alertID,ModalFilterProcPtr filterProc)
= 0xA987;
pascal short CautionAlert(short alertID,ModalFilterProcPtr filterProc)
= 0xA988;
pascal void CouldAlert(short alertID)
= 0xA989;
pascal void FreeAlert(short alertID)
= 0xA98A;
pascal void GetDItem(DialogPtr theDialog,short itemNo,short *itemType,Handle *item,
Rect *box)
= 0xA98D;
pascal void SetDItem(DialogPtr theDialog,short itemNo,short itemType,Handle item,
const Rect *box)
= 0xA98E;
pascal void HideDItem(DialogPtr theDialog,short itemNo)
= 0xA827;
pascal void ShowDItem(DialogPtr theDialog,short itemNo)
= 0xA828;
pascal void SelIText(DialogPtr theDialog,short itemNo,short strtSel,short endSel)
= 0xA97E;
pascal void GetIText(Handle item,Str255 text)
= 0xA990;
pascal void SetIText(Handle item,ConstStr255Param text)
= 0xA98F;
pascal short FindDItem(DialogPtr theDialog,Point thePt)
= 0xA984;
pascal DialogPtr NewCDialog(void *dStorage,const Rect *boundsRect,ConstStr255Param title,
Boolean visible,short procID,WindowPtr behind,Boolean goAwayFlag,long refCon,
Handle items)
= 0xAA4B;
DialogPtr newcdialog(void *dStorage,const Rect *boundsRect,char *title,
Boolean visible,short procID,WindowPtr behind,Boolean goAwayFlag,long refCon,
Handle items);
pascal void ResetAlrtStage(void)
= {0x4278,0x0A9A};
pascal void DlgCut(DialogPtr theDialog);
pascal void DlgPaste(DialogPtr theDialog);
pascal void DlgCopy(DialogPtr theDialog);
pascal void DlgDelete(DialogPtr theDialog);
pascal void SetDAFont(short fontNum)
= {0x31DF,0x0AFA};
void paramtext(char *param0,char *param1,char *param2,char *param3);
void getitext(Handle item,char *text);
void setitext(Handle item,char *text);
short findditem(DialogPtr theDialog,Point *thePt);
pascal void AppendDITL(DialogPtr theDialog,Handle theHandle,DITLMethod method);
pascal short CountDITL(DialogPtr theDialog);
pascal void ShortenDITL(DialogPtr theDialog,short numberItems);
# 15 "console.c" 2
# 1 "Events.h" 1
# 135 "Events.h"
# 16 "console.c" 2
# 1 "Menus.h" 1
enum {
mDrawMsg = 0,
mChooseMsg = 1,
mSizeMsg = 2,
mDrawItemMsg = 4,
mCalcItemMsg = 5,
textMenuProc = 0,
hMenuCmd = 27,
hierMenu = -1,
mPopUpMsg = 3,
mctAllItems = -98,
mctLastIDIndic = -99
};
struct MenuInfo {
short menuID;
short menuWidth;
short menuHeight;
Handle menuProc;
long enableFlags;
Str255 menuData;
};
typedef struct MenuInfo MenuInfo;
typedef MenuInfo *MenuPtr, **MenuHandle;
struct MCEntry {
short mctID;
short mctItem;
RGBColor mctRGB1;
RGBColor mctRGB2;
RGBColor mctRGB3;
RGBColor mctRGB4;
short mctReserved;
};
typedef struct MCEntry MCEntry;
typedef MCEntry *MCEntryPtr;
typedef MCEntry MCTable[1], *MCTablePtr, **MCTableHandle;
struct MenuCRsrc {
short numEntries;
MCTable mcEntryRecs;
};
typedef struct MenuCRsrc MenuCRsrc;
typedef MenuCRsrc *MenuCRsrcPtr, **MenuCRsrcHandle;
pascal void InitMenus(void)
= 0xA930;
pascal MenuHandle NewMenu(short menuID,const Str255 menuTitle)
= 0xA931;
pascal MenuHandle GetMenu(short resourceID)
= 0xA9BF;
pascal void DisposeMenu(MenuHandle theMenu)
= 0xA932;
pascal void AppendMenu(MenuHandle menu,ConstStr255Param data)
= 0xA933;
pascal void AddResMenu(MenuHandle theMenu,ResType theType)
= 0xA94D;
pascal void InsertResMenu(MenuHandle theMenu,ResType theType,short afterItem)
= 0xA951;
pascal void InsertMenu(MenuHandle theMenu,short beforeID)
= 0xA935;
pascal void DrawMenuBar(void)
= 0xA937;
pascal void InvalMenuBar(void)
= 0xA81D;
pascal void DeleteMenu(short menuID)
= 0xA936;
pascal void ClearMenuBar(void)
= 0xA934;
pascal Handle GetNewMBar(short menuBarID)
= 0xA9C0;
pascal Handle GetMenuBar(void)
= 0xA93B;
pascal void SetMenuBar(Handle menuList)
= 0xA93C;
pascal void InsMenuItem(MenuHandle theMenu,ConstStr255Param itemString,
short afterItem)
= 0xA826;
pascal void DelMenuItem(MenuHandle theMenu,short item)
= 0xA952;
pascal long MenuKey(short ch)
= 0xA93E;
pascal void HiliteMenu(short menuID)
= 0xA938;
pascal void SetItem(MenuHandle theMenu,short item,ConstStr255Param itemString)
= 0xA947;
pascal void GetItem(MenuHandle theMenu,short item,Str255 itemString)
= 0xA946;
pascal void DisableItem(MenuHandle theMenu,short item)
= 0xA93A;
pascal void EnableItem(MenuHandle theMenu,short item)
= 0xA939;
pascal void CheckItem(MenuHandle theMenu,short item,Boolean checked)
= 0xA945;
pascal void SetItemMark(MenuHandle theMenu,short item,short markChar)
= 0xA944;
pascal void GetItemMark(MenuHandle theMenu,short item,short *markChar)
= 0xA943;
pascal void SetItemIcon(MenuHandle theMenu,short item,short iconIndex)
= 0xA940;
pascal void GetItemIcon(MenuHandle theMenu,short item,short *iconIndex)
= 0xA93F;
pascal void SetItemStyle(MenuHandle theMenu,short item,short chStyle)
= 0xA942;
pascal void GetItemStyle(MenuHandle theMenu,short item,Style *chStyle);
pascal void CalcMenuSize(MenuHandle theMenu)
= 0xA948;
pascal short CountMItems(MenuHandle theMenu)
= 0xA950;
pascal MenuHandle GetMHandle(short menuID)
= 0xA949;
pascal void FlashMenuBar(short menuID)
= 0xA94C;
pascal void SetMenuFlash(short count)
= 0xA94A;
pascal long MenuSelect(Point startPt)
= 0xA93D;
pascal void InitProcMenu(short resID)
= 0xA808;
pascal void GetItemCmd(MenuHandle theMenu,short item,short *cmdChar)
= 0xA84E;
pascal void SetItemCmd(MenuHandle theMenu,short item,short cmdChar)
= 0xA84F;
pascal long PopUpMenuSelect(MenuHandle menu,short top,short left,short popUpItem)
= 0xA80B;
pascal long MenuChoice(void)
= 0xAA66;
pascal void DelMCEntries(short menuID,short menuItem)
= 0xAA60;
pascal MCTableHandle GetMCInfo(void)
= 0xAA61;
pascal void SetMCInfo(MCTableHandle menuCTbl)
= 0xAA62;
pascal void DispMCInfo(MCTableHandle menuCTbl)
= 0xAA63;
pascal MCEntryPtr GetMCEntry(short menuID,short menuItem)
= 0xAA64;
pascal void SetMCEntries(short numEntries,MCTablePtr menuCEntries)
= 0xAA65;
MenuHandle newmenu(short menuID,char *menuTitle);
void getitem(MenuHandle menu,short item,char *itemString);
void appendmenu(MenuHandle menu,char *data);
void insmenuitem(MenuHandle theMenu,char *itemString,short afterItem);
long menuselect(Point *startPt);
void setitem(MenuHandle menu,short item,char *itemString);
# 17 "console.c" 2
# 1 "TextEdit.h" 1
# 347 "TextEdit.h"
# 18 "console.c" 2
int DoCommand(long mResult);
# 1 "crtlocal.h" 1
# 1 "Types.h" 1
# 159 "Types.h"
# 1 "crtlocal.h" 2
# 1 "Errors.h" 1
enum {
paramErr = -50,
noHardwareErr = -200,
notEnoughHardwareErr = -201,
userCanceledErr = -128,
qErr = -1,
vTypErr = -2,
corErr = -3,
unimpErr = -4,
SlpTypeErr = -5,
seNoDB = -8,
controlErr = -17,
statusErr = -18,
readErr = -19,
writErr = -20,
badUnitErr = -21,
unitEmptyErr = -22,
openErr = -23,
closErr = -24,
dRemovErr = -25,
dInstErr = -26
};
enum {
abortErr = -27,
iIOAbortErr = -27,
notOpenErr = -28,
unitTblFullErr = -29,
dceExtErr = -30,
slotNumErr = -360,
gcrOnMFMErr = -400,
dirFulErr = -33,
dskFulErr = -34,
nsvErr = -35,
ioErr = -36,
bdNamErr = -37,
fnOpnErr = -38,
eofErr = -39,
posErr = -40,
mFulErr = -41,
tmfoErr = -42,
fnfErr = -43,
wPrErr = -44,
fLckdErr = -45
};
enum {
vLckdErr = -46,
fBsyErr = -47,
dupFNErr = -48,
opWrErr = -49,
rfNumErr = -51,
gfpErr = -52,
volOffLinErr = -53,
permErr = -54,
volOnLinErr = -55,
nsDrvErr = -56,
noMacDskErr = -57,
extFSErr = -58,
fsRnErr = -59,
badMDBErr = -60,
wrPermErr = -61,
dirNFErr = -120,
tmwdoErr = -121,
badMovErr = -122,
wrgVolTypErr = -123,
volGoneErr = -124
};
enum {
fidNotFound = -1300,
fidExists = -1301,
notAFileErr = -1302,
diffVolErr = -1303,
catChangedErr = -1304,
desktopDamagedErr = -1305,
sameFileErr = -1306,
badFidErr = -1307,
envNotPresent = -5500,
envBadVers = -5501,
envVersTooBig = -5502,
fontDecError = -64,
fontNotDeclared = -65,
fontSubErr = -66,
fontNotOutlineErr = -32615,
firstDskErr = -84,
lastDskErr = -64,
noDriveErr = -64,
offLinErr = -65,
noNybErr = -66
};
enum {
noAdrMkErr = -67,
dataVerErr = -68,
badCksmErr = -69,
badBtSlpErr = -70,
noDtaMkErr = -71,
badDCksum = -72,
badDBtSlp = -73,
wrUnderrun = -74,
cantStepErr = -75,
tk0BadErr = -76,
initIWMErr = -77,
twoSideErr = -78,
spdAdjErr = -79,
seekErr = -80,
sectNFErr = -81,
fmt1Err = -82,
fmt2Err = -83,
verErr = -84,
clkRdErr = -85,
clkWrErr = -86
};
enum {
prWrErr = -87,
prInitErr = -88,
rcvrErr = -89,
breakRecd = -90,
pmBusyErr = -13000,
pmReplyTOErr = -13001,
pmSendStartErr = -13002,
pmSendEndErr = -13003,
pmRecvStartErr = -13004,
pmRecvEndErr = -13005,
noScrapErr = -100,
noTypeErr = -102,
memROZWarn = -99,
memROZError = -99,
memROZErr = -99,
memFullErr = -108,
nilHandleErr = -109,
memWZErr = -111,
memPurErr = -112,
memAdrErr = -110
};
enum {
memAZErr = -113,
memPCErr = -114,
memBCErr = -115,
memSCErr = -116,
memLockedErr = -117,
resNotFound = -192,
resFNotFound = -193,
addResFailed = -194,
addRefFailed = -195,
rmvResFailed = -196,
rmvRefFailed = -197,
resAttrErr = -198,
mapReadErr = -199,
CantDecompress = -186,
badExtResource = -185,
evtNotEnb = 1,
noMemForPictPlaybackErr = -145,
rgnTooBigError = -147,
pixMapTooDeepErr = -148,
nsStackErr = -149
};
enum {
cMatchErr = -150,
cTempMemErr = -151,
cNoMemErr = -152,
cRangeErr = -153,
cProtectErr = -154,
cDevErr = -155,
cResErr = -156,
rgnTooBigErr = -500,
updPixMemErr = -125,
pictInfoVersionErr = -11000,
pictInfoIDErr = -11001,
pictInfoVerbErr = -11002,
cantLoadPickMethodErr = -11003,
colorsRequestedErr = -11004,
pictureDataErr = -11005,
noHardware = noHardwareErr,
notEnoughHardware = notEnoughHardwareErr,
queueFull = -203,
resProblem = -204,
badChannel = -205
};
enum {
badFormat = -206,
notEnoughBufferSpace = -207,
badFileFormat = -208,
channelBusy = -209,
buffersTooSmall = -210,
channelNotBusy = -211,
noMoreRealTime = -212,
siNoSoundInHardware = -220,
siBadSoundInDevice = -221,
siNoBufferSpecified = -222,
siInvalidCompression = -223,
siHardDriveTooSlow = -224,
siInvalidSampleRate = -225,
siInvalidSampleSize = -226,
siDeviceBusyErr = -227,
siBadDeviceName = -228,
siBadRefNum = -229,
siInputDeviceErr = -230,
siUnknownInfoType = -231,
siUnknownQuality = -232
};
enum {
nmTypErr = -299,
siInitSDTblErr = 1,
siInitVBLQsErr = 2,
siInitSPTblErr = 3,
sdmJTInitErr = 10,
sdmInitErr = 11,
sdmSRTInitErr = 12,
sdmPRAMInitErr = 13,
sdmPriInitErr = 14,
smSDMInitErr = -290,
smSRTInitErr = -291,
smPRAMInitErr = -292,
smPriInitErr = -293,
smEmptySlot = -300,
smCRCFail = -301,
smFormatErr = -302,
smRevisionErr = -303,
smNoDir = -304,
smDisabledSlot = -305,
smNosInfoArray = -306
};
enum {
smResrvErr = -307,
smUnExBusErr = -308,
smBLFieldBad = -309,
smFHBlockRdErr = -310,
smFHBlkDispErr = -311,
smDisposePErr = -312,
smNoBoardSRsrc = -313,
smGetPRErr = -314,
smNoBoardId = -315,
smInitStatVErr = -316,
smInitTblVErr = -317,
smNoJmpTbl = -318,
smBadBoardId = -319,
smBusErrTO = -320,
svTempDisable = -32768,
svDisabled = -32640,
smBadRefId = -330,
smBadsList = -331,
smReservedErr = -332,
smCodeRevErr = -333
};
enum {
smCPUErr = -334,
smsPointerNil = -335,
smNilsBlockErr = -336,
smSlotOOBErr = -337,
smSelOOBErr = -338,
smNewPErr = -339,
smBlkMoveErr = -340,
smCkStatusErr = -341,
smGetDrvrNamErr = -342,
smDisDrvrNamErr = -343,
smNoMoresRsrcs = -344,
smsGetDrvrErr = -345,
smBadsPtrErr = -346,
smByteLanesErr = -347,
smOffsetErr = -348,
smNoGoodOpens = -349,
smSRTOvrFlErr = -350,
smRecNotFnd = -351,
editionMgrInitErr = -450,
badSectionErr = -451
};
enum {
notRegisteredSectionErr = -452,
badEditionFileErr = -453,
badSubPartErr = -454,
multiplePublisherWrn = -460,
containerNotFoundWrn = -461,
containerAlreadyOpenWrn = -462,
notThePublisherWrn = -463,
teScrapSizeErr = -501,
hwParamErr = -502,
procNotFound = -600,
memFragErr = -601,
appModeErr = -602,
protocolErr = -603,
hardwareConfigErr = -604,
appMemFullErr = -605,
appIsDaemon = -606,
notEnoughMemoryErr = -620,
notHeldErr = -621,
cannotMakeContiguousErr = -622,
notLockedErr = -623
};
enum {
interruptsMaskedErr = -624,
cannotDeferErr = -625,
ddpSktErr = -91,
ddpLenErr = -92,
noBridgeErr = -93,
lapProtErr = -94,
excessCollsns = -95,
portInUse = -97,
portNotCf = -98,
nbpBuffOvr = -1024,
nbpNoConfirm = -1025,
nbpConfDiff = -1026,
nbpDuplicate = -1027,
nbpNotFound = -1028,
nbpNISErr = -1029,
aspBadVersNum = -1066,
aspBufTooSmall = -1067,
aspNoMoreSess = -1068,
aspNoServers = -1069,
aspParamErr = -1070
};
enum {
aspServerBusy = -1071,
aspSessClosed = -1072,
aspSizeErr = -1073,
aspTooMany = -1074,
aspNoAck = -1075,
reqFailed = -1096,
tooManyReqs = -1097,
tooManySkts = -1098,
badATPSkt = -1099,
badBuffNum = -1100,
noRelErr = -1101,
cbNotFound = -1102,
noSendResp = -1103,
noDataArea = -1104,
reqAborted = -1105,
buf2SmallErr = -3101,
noMPPErr = -3102,
ckSumErr = -3103,
extractErr = -3104,
readQErr = -3105
};
enum {
atpLenErr = -3106,
atpBadRsp = -3107,
recNotFnd = -3108,
sktClosedErr = -3109,
afpAccessDenied = -5000,
afpAuthContinue = -5001,
afpBadUAM = -5002,
afpBadVersNum = -5003,
afpBitmapErr = -5004,
afpCantMove = -5005,
afpDenyConflict = -5006,
afpDirNotEmpty = -5007,
afpDiskFull = -5008,
afpEofError = -5009,
afpFileBusy = -5010,
afpFlatVol = -5011,
afpItemNotFound = -5012,
afpLockErr = -5013,
afpMiscErr = -5014,
afpNoMoreLocks = -5015
};
enum {
afpNoServer = -5016,
afpObjectExists = -5017,
afpObjectNotFound = -5018,
afpParmErr = -5019,
afpRangeNotLocked = -5020,
afpRangeOverlap = -5021,
afpSessClosed = -5022,
afpUserNotAuth = -5023,
afpCallNotSupported = -5024,
afpObjectTypeErr = -5025,
afpTooManyFilesOpen = -5026,
afpServerGoingDown = -5027,
afpCantRename = -5028,
afpDirNotFound = -5029,
afpIconTypeError = -5030,
afpVolLocked = -5031,
afpObjectLocked = -5032,
afpContainsSharedErr = -5033,
afpIDNotFound = -5034,
afpIDExists = -5035
};
enum {
afpDiffVolErr = -5036,
afpCatalogChanged = -5037,
afpSameObjectErr = -5038,
afpBadIDErr = -5039,
afpPwdSameErr = -5040,
afpPwdTooShortErr = -5041,
afpPwdExpiredErr = -5042,
afpInsideSharedErr = -5043,
afpInsideTrashErr = -5044,
notInitErr = -900,
nameTypeErr = -902,
noPortErr = -903,
noGlobalsErr = -904,
localOnlyErr = -905,
destPortErr = -906,
sessTableErr = -907,
noSessionErr = -908,
badReqErr = -909,
portNameExistsErr = -910,
noUserNameErr = -911
};
enum {
userRejectErr = -912,
noMachineNameErr = -913,
noToolboxNameErr = -914,
noResponseErr = -915,
portClosedErr = -916,
sessClosedErr = -917,
badPortNameErr = -919,
noDefaultUserErr = -922,
notLoggedInErr = -923,
noUserRefErr = -924,
networkErr = -925,
noInformErr = -926,
authFailErr = -927,
noUserRecErr = -928,
badServiceMethodErr = -930,
badLocNameErr = -931,
guestNotAllowedErr = -932,
swOverrunErr = 1,
parityErr = 16,
hwOverrunErr = 32
};
enum {
framingErr = 64,
dsBusError = 1,
dsAddressErr = 2,
dsIllInstErr = 3,
dsZeroDivErr = 4,
dsChkErr = 5,
dsOvflowErr = 6,
dsPrivErr = 7,
dsTraceErr = 8,
dsLineAErr = 9,
dsLineFErr = 10,
dsMiscErr = 11,
dsCoreErr = 12,
dsIrqErr = 13,
dsIOCoreErr = 14,
dsLoadErr = 15,
dsFPErr = 16,
dsNoPackErr = 17,
dsNoPk1 = 18,
dsNoPk2 = 19
};
enum {
dsNoPk3 = 20,
dsNoPk4 = 21,
dsNoPk5 = 22,
dsNoPk6 = 23,
dsNoPk7 = 24,
dsMemFullErr = 25,
dsBadLaunch = 26,
dsFSErr = 27,
dsStknHeap = 28,
negZcbFreeErr = 33,
dsFinderErr = 41,
dsBadSlotInt = 51,
dsBadSANEOpcode = 81,
dsBadPatchHeader = 83,
menuPrgErr = 84,
dsMBarNFnd = 85,
dsHMenuFindErr = 86,
dsWDEFNotFound = 87,
dsCDEFNotFound = 88,
dsMDEFNotFound = 89
};
enum {
dsNoFPU = 90,
dsNoPatch = 98,
dsBadPatch = 99,
dsParityErr = 101,
dsOldSystem = 102,
ds32BitMode = 103,
dsNeedToWriteBootBlocks = 104,
dsNotEnoughRAMToBoot = 105,
dsBufPtrTooLow = 106,
dsReinsert = 30,
shutDownAlert = 42,
dsShutDownOrRestart = 20000,
dsSwitchOffOrRestart = 20001,
dsForcedQuit = 20002,
dsMacsBugInstalled = -10,
dsDisassemblerInstalled = -11,
dsExtensionsDisabled = -13,
dsGreeting = 40,
dsSysErr = 32767,
WDEFNFnd = dsWDEFNotFound
};
enum {
CDEFNFnd = dsCDEFNotFound,
dsNotThe1 = 31,
dsBadStartupDisk = 42,
dsSystemFileErr = 43,
dsHD20Installed = -12,
mBarNFnd = -126,
hMenuFindErr = -127,
userBreak = -490,
strUserBreak = -491,
exUserBreak = -492,
selectorErr = paramErr
};
extern short MacOSErr;
pascal void SysError(short errorCode)
= {0x301F,0xA9C9};
# 2 "crtlocal.h" 2
# 1 "Memory.h" 1
# 345 "Memory.h"
# 3 "crtlocal.h" 2
# 1 "OSUtils.h" 1
# 267 "OSUtils.h"
# 4 "crtlocal.h" 2
# 1 "SegLoad.h" 1
# 57 "SegLoad.h"
# 5 "crtlocal.h" 2
# 1 "Quickdraw.h" 1
# 1078 "Quickdraw.h"
# 6 "crtlocal.h" 2
# 1 "Files.h" 1
enum {
fsAtMark = 0,
fOnDesk = 1,
fsCurPerm = 0,
fHasBundle = 8192,
fsRdPerm = 1,
fInvisible = 16384,
fTrash = -3,
fsWrPerm = 2,
fDesktop = -2,
fsRdWrPerm = 3,
fDisk = 0,
fsRdWrShPerm = 4,
fsFromStart = 1,
fsFromLEOF = 2,
fsFromMark = 3,
rdVerify = 64,
ioDirFlg = 3,
ioDirMask = 0x10,
fsRtParID = 1,
fsRtDirID = 2
};
enum {
fsSBPartialName = 1,
fsSBFullName = 2,
fsSBFlAttrib = 4,
fsSBFlFndrInfo = 8,
fsSBFlLgLen = 32,
fsSBFlPyLen = 64,
fsSBFlRLgLen = 128,
fsSBFlRPyLen = 256,
fsSBFlCrDat = 512,
fsSBFlMdDat = 1024,
fsSBFlBkDat = 2048,
fsSBFlXFndrInfo = 4096,
fsSBFlParID = 8192,
fsSBNegate = 16384,
fsSBDrUsrWds = 8,
fsSBDrNmFls = 16,
fsSBDrCrDat = 512,
fsSBDrMdDat = 1024,
fsSBDrBkDat = 2048,
fsSBDrFndrInfo = 4096
};
enum {
fsSBDrParID = 8192,
bLimitFCBs = 31,
bLocalWList = 30,
bNoMiniFndr = 29,
bNoVNEdit = 28,
bNoLclSync = 27,
bTrshOffLine = 26,
bNoSwitchTo = 25,
bNoDeskItems = 20,
bNoBootBlks = 19,
bAccessCntl = 18,
bNoSysDir = 17,
bHasExtFSVol = 16,
bHasOpenDeny = 15,
bHasCopyFile = 14,
bHasMoveRename = 13,
bHasDesktopMgr = 12,
bHasShortName = 11,
bHasFolderLock = 10,
bHasPersonalAccessPrivileges = 9
};
enum {
bHasUserGroupList = 8,
bHasCatSearch = 7,
bHasFileIDs = 6,
bHasBTreeMgr = 5,
bHasBlankAccessPrivileges = 4,
kLargeIcon = 1,
kLarge4BitIcon = 2,
kLarge8BitIcon = 3,
kSmallIcon = 4,
kSmall4BitIcon = 5,
kSmall8BitIcon = 6,
kLargeIconSize = 256,
kLarge4BitIconSize = 512,
kLarge8BitIconSize = 1024,
kSmallIconSize = 64,
kSmall4BitIconSize = 128,
kSmall8BitIconSize = 256,
fsUnixPriv = 1,
developStage = 0x20,
alphaStage = 0x40
};
enum {
betaStage = 0x60,
finalStage = 0x80,
kNoUserAuthentication = 1,
kPassword = 2,
kEncryptPassword = 3,
kTwoWayEncryptPassword = 6
};
enum {hFileInfo,dirInfo};
typedef unsigned char CInfoType;
struct FInfo {
OSType fdType;
OSType fdCreator;
unsigned short fdFlags;
Point fdLocation;
short fdFldr;
};
typedef struct FInfo FInfo;
struct FXInfo {
short fdIconID;
short fdUnused[3];
char fdScript;
char fdXFlags;
short fdComment;
long fdPutAway;
};
typedef struct FXInfo FXInfo;
struct DInfo {
Rect frRect;
unsigned short frFlags;
Point frLocation;
short frView;
};
typedef struct DInfo DInfo;
struct DXInfo {
Point frScroll;
long frOpenChain;
char frScript;
char frXFlags;
short frComment;
long frPutAway;
};
typedef struct DXInfo DXInfo;
struct GetVolParmsInfoBuffer {
short vMVersion;
long vMAttrib;
Handle vMLocalHand;
long vMServerAdr;
long vMVolumeGrade;
short vMForeignPrivID;
};
typedef struct GetVolParmsInfoBuffer GetVolParmsInfoBuffer;
# 209 "Files.h"
struct IOParam {
QElemPtr qLink; short qType; short ioTrap; Ptr ioCmdAddr; ProcPtr ioCompletion; OSErr ioResult; StringPtr ioNamePtr; short ioVRefNum;
short ioRefNum;
char ioVersNum;
char ioPermssn;
Ptr ioMisc;
Ptr ioBuffer;
long ioReqCount;
long ioActCount;
short ioPosMode;
long ioPosOffset;
};
typedef struct IOParam IOParam;
struct FileParam {
QElemPtr qLink; short qType; short ioTrap; Ptr ioCmdAddr; ProcPtr ioCompletion; OSErr ioResult; StringPtr ioNamePtr; short ioVRefNum;
short ioFRefNum;
char ioFVersNum;
char filler1;
short ioFDirIndex;
unsigned char ioFlAttrib;
unsigned char ioFlVersNum;
FInfo ioFlFndrInfo;
unsigned long ioFlNum;
unsigned short ioFlStBlk;
long ioFlLgLen;
long ioFlPyLen;
unsigned short ioFlRStBlk;
long ioFlRLgLen;
long ioFlRPyLen;
unsigned long ioFlCrDat;
unsigned long ioFlMdDat;
};
typedef struct FileParam FileParam;
struct VolumeParam {
QElemPtr qLink; short qType; short ioTrap; Ptr ioCmdAddr; ProcPtr ioCompletion; OSErr ioResult; StringPtr ioNamePtr; short ioVRefNum;
long filler2;
short ioVolIndex;
unsigned long ioVCrDate;
unsigned long ioVLsBkUp;
unsigned short ioVAtrb;
unsigned short ioVNmFls;
unsigned short ioVDirSt;
short ioVBlLn;
unsigned short ioVNmAlBlks;
long ioVAlBlkSiz;
long ioVClpSiz;
unsigned short ioAlBlSt;
unsigned long ioVNxtFNum;
unsigned short ioVFrBlk;
};
typedef struct VolumeParam VolumeParam;
struct CntrlParam {
QElem *qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
ProcPtr ioCompletion;
OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
short ioCRefNum;
short csCode;
short csParam[11];
};
typedef struct CntrlParam CntrlParam;
struct SlotDevParam {
QElemPtr qLink; short qType; short ioTrap; Ptr ioCmdAddr; ProcPtr ioCompletion; OSErr ioResult; StringPtr ioNamePtr; short ioVRefNum;
short ioRefNum;
char ioVersNum;
char ioPermssn;
Ptr ioMix;
short ioFlags;
char ioSlot;
char ioID;
};
typedef struct SlotDevParam SlotDevParam;
struct MultiDevParam {
QElemPtr qLink; short qType; short ioTrap; Ptr ioCmdAddr; ProcPtr ioCompletion; OSErr ioResult; StringPtr ioNamePtr; short ioVRefNum;
short ioRefNum;
char ioVersNum;
char ioPermssn;
Ptr ioMix;
short ioFlags;
Ptr ioSEBlkPtr;
};
typedef struct MultiDevParam MultiDevParam;
union ParamBlockRec {
IOParam ioParam;
FileParam fileParam;
VolumeParam volumeParam;
CntrlParam cntrlParam;
SlotDevParam slotDevParam;
MultiDevParam multiDevParam;
};
typedef union ParamBlockRec ParamBlockRec;
typedef ParamBlockRec *ParmBlkPtr;
struct HFileInfo {
QElemPtr qLink; short qType; short ioTrap; Ptr ioCmdAddr; ProcPtr ioCompletion; OSErr ioResult; StringPtr ioNamePtr; short ioVRefNum;
short ioFRefNum;
char ioFVersNum;
char filler1;
short ioFDirIndex;
char ioFlAttrib;
char filler2;
FInfo ioFlFndrInfo;
long ioDirID;
unsigned short ioFlStBlk;
long ioFlLgLen;
long ioFlPyLen;
unsigned short ioFlRStBlk;
long ioFlRLgLen;
long ioFlRPyLen;
unsigned long ioFlCrDat;
unsigned long ioFlMdDat;
unsigned long ioFlBkDat;
FXInfo ioFlXFndrInfo;
long ioFlParID;
long ioFlClpSiz;
};
typedef struct HFileInfo HFileInfo;
struct DirInfo {
QElemPtr qLink; short qType; short ioTrap; Ptr ioCmdAddr; ProcPtr ioCompletion; OSErr ioResult; StringPtr ioNamePtr; short ioVRefNum;
short ioFRefNum;
short filler1;
short ioFDirIndex;
char ioFlAttrib;
char filler2;
DInfo ioDrUsrWds;
long ioDrDirID;
unsigned short ioDrNmFls;
short filler3[9];
unsigned long ioDrCrDat;
unsigned long ioDrMdDat;
unsigned long ioDrBkDat;
DXInfo ioDrFndrInfo;
long ioDrParID;
};
typedef struct DirInfo DirInfo;
union CInfoPBRec {
HFileInfo hFileInfo;
DirInfo dirInfo;
};
typedef union CInfoPBRec CInfoPBRec;
typedef CInfoPBRec *CInfoPBPtr;
struct HIOParam {
QElemPtr qLink; short qType; short ioTrap; Ptr ioCmdAddr; ProcPtr ioCompletion; OSErr ioResult; StringPtr ioNamePtr; short ioVRefNum;
short ioRefNum;
char ioVersNum;
char ioPermssn;
Ptr ioMisc;
Ptr ioBuffer;
long ioReqCount;
long ioActCount;
short ioPosMode;
long ioPosOffset;
short filler1;
};
typedef struct HIOParam HIOParam;
struct HFileParam {
QElemPtr qLink; short qType; short ioTrap; Ptr ioCmdAddr; ProcPtr ioCompletion; OSErr ioResult; StringPtr ioNamePtr; short ioVRefNum;
short ioFRefNum;
char ioFVersNum;
char filler1;
short ioFDirIndex;
char ioFlAttrib;
char ioFlVersNum;
FInfo ioFlFndrInfo;
long ioDirID;
unsigned short ioFlStBlk;
long ioFlLgLen;
long ioFlPyLen;
unsigned short ioFlRStBlk;
long ioFlRLgLen;
long ioFlRPyLen;
unsigned long ioFlCrDat;
unsigned long ioFlMdDat;
};
typedef struct HFileParam HFileParam;
struct HVolumeParam {
QElemPtr qLink; short qType; short ioTrap; Ptr ioCmdAddr; ProcPtr ioCompletion; OSErr ioResult; StringPtr ioNamePtr; short ioVRefNum;
long filler2;
short ioVolIndex;
unsigned long ioVCrDate;
unsigned long ioVLsMod;
short ioVAtrb;
unsigned short ioVNmFls;
short ioVBitMap;
short ioAllocPtr;
unsigned short ioVNmAlBlks;
long ioVAlBlkSiz;
long ioVClpSiz;
short ioAlBlSt;
long ioVNxtCNID;
unsigned short ioVFrBlk;
unsigned short ioVSigWord;
short ioVDrvInfo;
short ioVDRefNum;
short ioVFSID;
unsigned long ioVBkUp;
unsigned short ioVSeqNum;
long ioVWrCnt;
long ioVFilCnt;
long ioVDirCnt;
long ioVFndrInfo[8];
};
typedef struct HVolumeParam HVolumeParam;
struct AccessParam {
QElemPtr qLink; short qType; short ioTrap; Ptr ioCmdAddr; ProcPtr ioCompletion; OSErr ioResult; StringPtr ioNamePtr; short ioVRefNum;
short filler3;
short ioDenyModes;
short filler4;
char filler5;
char ioACUser;
long filler6;
long ioACOwnerID;
long ioACGroupID;
long ioACAccess;
};
typedef struct AccessParam AccessParam;
struct ObjParam {
QElemPtr qLink; short qType; short ioTrap; Ptr ioCmdAddr; ProcPtr ioCompletion; OSErr ioResult; StringPtr ioNamePtr; short ioVRefNum;
short filler7;
short ioObjType;
StringPtr ioObjNamePtr;
long ioObjID;
long ioReqCount;
long ioActCount;
};
typedef struct ObjParam ObjParam;
struct CopyParam {
QElemPtr qLink; short qType; short ioTrap; Ptr ioCmdAddr; ProcPtr ioCompletion; OSErr ioResult; StringPtr ioNamePtr; short ioVRefNum;
short ioDstVRefNum;
short filler8;
StringPtr ioNewName;
StringPtr ioCopyName;
long ioNewDirID;
long filler14;
long filler15;
long ioDirID;
};
typedef struct CopyParam CopyParam;
struct WDParam {
QElemPtr qLink; short qType; short ioTrap; Ptr ioCmdAddr; ProcPtr ioCompletion; OSErr ioResult; StringPtr ioNamePtr; short ioVRefNum;
short filler9;
short ioWDIndex;
long ioWDProcID;
short ioWDVRefNum;
short filler10;
long filler11;
long filler12;
long filler13;
long ioWDDirID;
};
typedef struct WDParam WDParam;
struct FIDParam {
QElemPtr qLink; short qType; short ioTrap; Ptr ioCmdAddr; ProcPtr ioCompletion; OSErr ioResult; StringPtr ioNamePtr; short ioVRefNum;
long filler1;
StringPtr ioDestNamePtr;
long filler2;
long ioDestDirID;
long filler3;
long filler4;
long ioSrcDirID;
short filler5;
long ioFileID;
};
typedef struct FIDParam FIDParam;
struct CatPositionRec {
long initialize;
short priv[6];
};
typedef struct CatPositionRec CatPositionRec;
struct FSSpec {
short vRefNum;
long parID;
Str63 name;
};
typedef struct FSSpec FSSpec;
typedef FSSpec *FSSpecPtr, **FSSpecHandle;
typedef FSSpecPtr FSSpecArrayPtr;
typedef OSType VolumeType;
struct VolMountInfoHeader {
short length;
VolumeType media;
};
typedef struct VolMountInfoHeader VolMountInfoHeader;
typedef VolMountInfoHeader *VolMountInfoPtr;
struct AFPVolMountInfo {
short length;
VolumeType media;
short flags;
char nbpInterval;
char nbpCount;
short uamType;
short zoneNameOffset;
short serverNameOffset;
short volNameOffset;
short userNameOffset;
short userPasswordOffset;
short volPasswordOffset;
char AFPData[144];
};
typedef struct AFPVolMountInfo AFPVolMountInfo;
typedef AFPVolMountInfo *AFPVolMountInfoPtr;
struct CSParam {
QElemPtr qLink; short qType; short ioTrap; Ptr ioCmdAddr; ProcPtr ioCompletion; OSErr ioResult; StringPtr ioNamePtr; short ioVRefNum;
FSSpecPtr ioMatchPtr;
long ioReqMatchCount;
long ioActMatchCount;
long ioSearchBits;
CInfoPBPtr ioSearchInfo1;
CInfoPBPtr ioSearchInfo2;
long ioSearchTime;
CatPositionRec ioCatPosition;
Ptr ioOptBuffer;
long ioOptBufSize;
};
typedef struct CSParam CSParam;
typedef CSParam *CSParamPtr;
struct DTPBRec {
QElemPtr qLink; short qType; short ioTrap; Ptr ioCmdAddr; ProcPtr ioCompletion; OSErr ioResult; StringPtr ioNamePtr; short ioVRefNum;
short ioDTRefNum;
short ioIndex;
long ioTagInfo;
Ptr ioDTBuffer;
long ioDTReqCount;
long ioDTActCount;
char ioFiller1;
char ioIconType;
short ioFiller2;
long ioDirID;
OSType ioFileCreator;
OSType ioFileType;
long ioFiller3;
long ioDTLgLen;
long ioDTPyLen;
short ioFiller4[14];
long ioAPPLParID;
};
typedef struct DTPBRec DTPBRec;
typedef DTPBRec *DTPBPtr;
struct ForeignPrivParam {
QElemPtr qLink; short qType; short ioTrap; Ptr ioCmdAddr; ProcPtr ioCompletion; OSErr ioResult; StringPtr ioNamePtr; short ioVRefNum;
long ioFiller1;
long ioFiller2;
Ptr ioForeignPrivBuffer;
long ioForeignPrivActCount;
long ioForeignPrivReqCount;
long ioFiller3;
long ioForeignPrivDirID;
long ioForeignPrivInfo1;
long ioForeignPrivInfo2;
long ioForeignPrivInfo3;
long ioForeignPrivInfo4;
};
typedef struct ForeignPrivParam ForeignPrivParam;
typedef ForeignPrivParam *ForeignPrivParamPtr;
union HParamBlockRec {
HIOParam ioParam;
HFileParam fileParam;
HVolumeParam volumeParam;
AccessParam accessParam;
ObjParam objParam;
CopyParam copyParam;
WDParam wdParam;
FIDParam fidParam;
CSParam csParam;
ForeignPrivParam foreignPrivParam;
};
typedef union HParamBlockRec HParamBlockRec;
typedef HParamBlockRec *HParmBlkPtr;
struct CMovePBRec {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
ProcPtr ioCompletion;
OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
long filler1;
StringPtr ioNewName;
long filler2;
long ioNewDirID;
long filler3[2];
long ioDirID;
};
typedef struct CMovePBRec CMovePBRec;
typedef CMovePBRec *CMovePBPtr;
struct WDPBRec {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
ProcPtr ioCompletion;
OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
short filler1;
short ioWDIndex;
long ioWDProcID;
short ioWDVRefNum;
short filler2[7];
long ioWDDirID;
};
typedef struct WDPBRec WDPBRec;
typedef WDPBRec *WDPBPtr;
struct FCBPBRec {
QElemPtr qLink;
short qType;
short ioTrap;
Ptr ioCmdAddr;
ProcPtr ioCompletion;
OSErr ioResult;
StringPtr ioNamePtr;
short ioVRefNum;
short ioRefNum;
short filler;
short ioFCBIndx;
short filler1;
long ioFCBFlNm;
short ioFCBFlags;
unsigned short ioFCBStBlk;
long ioFCBEOF;
long ioFCBPLen;
long ioFCBCrPs;
short ioFCBVRefNum;
long ioFCBClpSiz;
long ioFCBParID;
};
typedef struct FCBPBRec FCBPBRec;
typedef FCBPBRec *FCBPBPtr;
struct VCB {
QElemPtr qLink;
short qType;
short vcbFlags;
unsigned short vcbSigWord;
unsigned long vcbCrDate;
unsigned long vcbLsMod;
short vcbAtrb;
unsigned short vcbNmFls;
short vcbVBMSt;
short vcbAllocPtr;
unsigned short vcbNmAlBlks;
long vcbAlBlkSiz;
long vcbClpSiz;
short vcbAlBlSt;
long vcbNxtCNID;
unsigned short vcbFreeBks;
Str27 vcbVN;
short vcbDrvNum;
short vcbDRefNum;
short vcbFSID;
short vcbVRefNum;
Ptr vcbMAdr;
Ptr vcbBufAdr;
short vcbMLen;
short vcbDirIndex;
short vcbDirBlk;
unsigned long vcbVolBkUp;
unsigned short vcbVSeqNum;
long vcbWrCnt;
long vcbXTClpSiz;
long vcbCTClpSiz;
unsigned short vcbNmRtDirs;
long vcbFilCnt;
long vcbDirCnt;
long vcbFndrInfo[8];
unsigned short vcbVCSize;
unsigned short vcbVBMCSiz;
unsigned short vcbCtlCSiz;
unsigned short vcbXTAlBlks;
unsigned short vcbCTAlBlks;
short vcbXTRef;
short vcbCTRef;
Ptr vcbCtlBuf;
long vcbDirIDM;
short vcbOffsM;
};
typedef struct VCB VCB;
struct DrvQEl {
QElemPtr qLink;
short qType;
short dQDrive;
short dQRefNum;
short dQFSID;
unsigned short dQDrvSz;
unsigned short dQDrvSz2;
};
typedef struct DrvQEl DrvQEl;
typedef DrvQEl *DrvQElPtr;
struct NumVersion {
unsigned char majorRev;
unsigned int minorRev : 4;
unsigned int bugFixRev : 4;
unsigned char stage;
unsigned char nonRelRev;
};
typedef struct NumVersion NumVersion;
struct VersRec {
NumVersion numericVersion;
short countryCode;
Str255 shortVersion;
Str255 reserved;
};
typedef struct VersRec VersRec;
typedef VersRec *VersRecPtr, **VersRecHndl;
pascal OSErr PBOpen(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBOpenSync(__A0)
pascal OSErr PBOpenSync(ParmBlkPtr paramBlock)
= 0xA000;
#pragma parameter __D0 PBOpenAsync(__A0)
pascal OSErr PBOpenAsync(ParmBlkPtr paramBlock)
= 0xA400;
pascal OSErr PBClose(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBCloseSync(__A0)
pascal OSErr PBCloseSync(ParmBlkPtr paramBlock)
= 0xA001;
#pragma parameter __D0 PBCloseAsync(__A0)
pascal OSErr PBCloseAsync(ParmBlkPtr paramBlock)
= 0xA401;
pascal OSErr PBRead(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBReadSync(__A0)
pascal OSErr PBReadSync(ParmBlkPtr paramBlock)
= 0xA002;
#pragma parameter __D0 PBReadAsync(__A0)
pascal OSErr PBReadAsync(ParmBlkPtr paramBlock)
= 0xA402;
pascal OSErr PBWrite(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBWriteSync(__A0)
pascal OSErr PBWriteSync(ParmBlkPtr paramBlock)
= 0xA003;
#pragma parameter __D0 PBWriteAsync(__A0)
pascal OSErr PBWriteAsync(ParmBlkPtr paramBlock)
= 0xA403;
pascal OSErr PBGetVInfo(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBGetVInfoSync(__A0)
pascal OSErr PBGetVInfoSync(ParmBlkPtr paramBlock)
= 0xA007;
#pragma parameter __D0 PBGetVInfoAsync(__A0)
pascal OSErr PBGetVInfoAsync(ParmBlkPtr paramBlock)
= 0xA407;
pascal OSErr PBGetVol(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBGetVolSync(__A0)
pascal OSErr PBGetVolSync(ParmBlkPtr paramBlock)
= 0xA014;
#pragma parameter __D0 PBGetVolAsync(__A0)
pascal OSErr PBGetVolAsync(ParmBlkPtr paramBlock)
= 0xA414;
pascal OSErr PBSetVol(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBSetVolSync(__A0)
pascal OSErr PBSetVolSync(ParmBlkPtr paramBlock)
= 0xA015;
#pragma parameter __D0 PBSetVolAsync(__A0)
pascal OSErr PBSetVolAsync(ParmBlkPtr paramBlock)
= 0xA415;
pascal OSErr PBFlushVol(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBFlushVolSync(__A0)
pascal OSErr PBFlushVolSync(ParmBlkPtr paramBlock)
= 0xA013;
#pragma parameter __D0 PBFlushVolAsync(__A0)
pascal OSErr PBFlushVolAsync(ParmBlkPtr paramBlock)
= 0xA413;
pascal OSErr PBCreate(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBCreateSync(__A0)
pascal OSErr PBCreateSync(ParmBlkPtr paramBlock)
= 0xA008;
#pragma parameter __D0 PBCreateAsync(__A0)
pascal OSErr PBCreateAsync(ParmBlkPtr paramBlock)
= 0xA408;
pascal OSErr PBDelete(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBDeleteSync(__A0)
pascal OSErr PBDeleteSync(ParmBlkPtr paramBlock)
= 0xA009;
#pragma parameter __D0 PBDeleteAsync(__A0)
pascal OSErr PBDeleteAsync(ParmBlkPtr paramBlock)
= 0xA409;
pascal OSErr PBOpenDF(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBOpenDFSync(__A0)
pascal OSErr PBOpenDFSync(ParmBlkPtr paramBlock)
= {0x701A,0xA060};
#pragma parameter __D0 PBOpenDFAsync(__A0)
pascal OSErr PBOpenDFAsync(ParmBlkPtr paramBlock)
= {0x701A,0xA460};
pascal OSErr PBOpenRF(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBOpenRFSync(__A0)
pascal OSErr PBOpenRFSync(ParmBlkPtr paramBlock)
= 0xA00A;
#pragma parameter __D0 PBOpenRFAsync(__A0)
pascal OSErr PBOpenRFAsync(ParmBlkPtr paramBlock)
= 0xA40A;
pascal OSErr PBRename(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBRenameSync(__A0)
pascal OSErr PBRenameSync(ParmBlkPtr paramBlock)
= 0xA00B;
#pragma parameter __D0 PBRenameAsync(__A0)
pascal OSErr PBRenameAsync(ParmBlkPtr paramBlock)
= 0xA40B;
pascal OSErr PBGetFInfo(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBGetFInfoSync(__A0)
pascal OSErr PBGetFInfoSync(ParmBlkPtr paramBlock)
= 0xA00C;
#pragma parameter __D0 PBGetFInfoAsync(__A0)
pascal OSErr PBGetFInfoAsync(ParmBlkPtr paramBlock)
= 0xA40C;
pascal OSErr PBSetFInfo(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBSetFInfoSync(__A0)
pascal OSErr PBSetFInfoSync(ParmBlkPtr paramBlock)
= 0xA00D;
#pragma parameter __D0 PBSetFInfoAsync(__A0)
pascal OSErr PBSetFInfoAsync(ParmBlkPtr paramBlock)
= 0xA40D;
pascal OSErr PBSetFLock(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBSetFLockSync(__A0)
pascal OSErr PBSetFLockSync(ParmBlkPtr paramBlock)
= 0xA041;
#pragma parameter __D0 PBSetFLockAsync(__A0)
pascal OSErr PBSetFLockAsync(ParmBlkPtr paramBlock)
= 0xA441;
pascal OSErr PBRstFLock(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBRstFLockSync(__A0)
pascal OSErr PBRstFLockSync(ParmBlkPtr paramBlock)
= 0xA042;
#pragma parameter __D0 PBRstFLockAsync(__A0)
pascal OSErr PBRstFLockAsync(ParmBlkPtr paramBlock)
= 0xA442;
pascal OSErr PBSetFVers(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBSetFVersSync(__A0)
pascal OSErr PBSetFVersSync(ParmBlkPtr paramBlock)
= 0xA043;
#pragma parameter __D0 PBSetFVersAsync(__A0)
pascal OSErr PBSetFVersAsync(ParmBlkPtr paramBlock)
= 0xA443;
pascal OSErr PBAllocate(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBAllocateSync(__A0)
pascal OSErr PBAllocateSync(ParmBlkPtr paramBlock)
= 0xA010;
#pragma parameter __D0 PBAllocateAsync(__A0)
pascal OSErr PBAllocateAsync(ParmBlkPtr paramBlock)
= 0xA410;
pascal OSErr PBGetEOF(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBGetEOFSync(__A0)
pascal OSErr PBGetEOFSync(ParmBlkPtr paramBlock)
= 0xA011;
#pragma parameter __D0 PBGetEOFAsync(__A0)
pascal OSErr PBGetEOFAsync(ParmBlkPtr paramBlock)
= 0xA411;
pascal OSErr PBSetEOF(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBSetEOFSync(__A0)
pascal OSErr PBSetEOFSync(ParmBlkPtr paramBlock)
= 0xA012;
#pragma parameter __D0 PBSetEOFAsync(__A0)
pascal OSErr PBSetEOFAsync(ParmBlkPtr paramBlock)
= 0xA412;
pascal OSErr PBGetFPos(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBGetFPosSync(__A0)
pascal OSErr PBGetFPosSync(ParmBlkPtr paramBlock)
= 0xA018;
#pragma parameter __D0 PBGetFPosAsync(__A0)
pascal OSErr PBGetFPosAsync(ParmBlkPtr paramBlock)
= 0xA418;
pascal OSErr PBSetFPos(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBSetFPosSync(__A0)
pascal OSErr PBSetFPosSync(ParmBlkPtr paramBlock)
= 0xA044;
#pragma parameter __D0 PBSetFPosAsync(__A0)
pascal OSErr PBSetFPosAsync(ParmBlkPtr paramBlock)
= 0xA444;
pascal OSErr PBFlushFile(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBFlushFileSync(__A0)
pascal OSErr PBFlushFileSync(ParmBlkPtr paramBlock)
= 0xA045;
#pragma parameter __D0 PBFlushFileAsync(__A0)
pascal OSErr PBFlushFileAsync(ParmBlkPtr paramBlock)
= 0xA445;
#pragma parameter __D0 PBMountVol(__A0)
pascal OSErr PBMountVol(ParmBlkPtr paramBlock)
= 0xA00F;
#pragma parameter __D0 PBUnmountVol(__A0)
pascal OSErr PBUnmountVol(ParmBlkPtr paramBlock)
= 0xA00E;
#pragma parameter __D0 PBEject(__A0)
pascal OSErr PBEject(ParmBlkPtr paramBlock)
= 0xA017;
#pragma parameter __D0 PBOffLine(__A0)
pascal OSErr PBOffLine(ParmBlkPtr paramBlock)
= 0xA035;
pascal OSErr PBCatSearch(CSParamPtr paramBlock,Boolean async);
#pragma parameter __D0 PBCatSearchSync(__A0)
pascal OSErr PBCatSearchSync(CSParamPtr paramBlock)
= {0x7018,0xA260};
#pragma parameter __D0 PBCatSearchAsync(__A0)
pascal OSErr PBCatSearchAsync(CSParamPtr paramBlock)
= {0x7018,0xA660};
pascal void AddDrive(short drvrRefNum,short drvNum,DrvQElPtr qEl);
pascal OSErr FSOpen(ConstStr255Param fileName,short vRefNum,short *refNum);
pascal OSErr OpenDF(ConstStr255Param fileName,short vRefNum,short *refNum);
OSErr fsopen(char *fileName,short vRefNum,short *refNum);
pascal OSErr FSClose(short refNum);
pascal OSErr FSRead(short refNum,long *count,void *buffPtr);
pascal OSErr FSWrite(short refNum,long *count,const void *buffPtr);
pascal OSErr GetVInfo(short drvNum,StringPtr volName,short *vRefNum,long *freeBytes);
OSErr getvinfo(short drvNum,char *volName,short *vRefNum,long *freeBytes);
pascal OSErr GetFInfo(ConstStr255Param fileName,short vRefNum,FInfo *fndrInfo);
OSErr getfinfo(char *fileName,short vRefNum,FInfo *fndrInfo);
pascal OSErr GetVol(StringPtr volName,short *vRefNum);
OSErr getvol(char *volName,short *vRefNum);
pascal OSErr SetVol(StringPtr volName,short vRefNum);
OSErr setvol(char *volName,short vRefNum);
pascal OSErr UnmountVol(StringPtr volName,short vRefNum);
OSErr unmountvol(char *volName,short vRefNum);
pascal OSErr Eject(StringPtr volName,short vRefNum);
OSErr eject(char *volName,short vRefNum);
pascal OSErr FlushVol(StringPtr volName,short vRefNum);
OSErr flushvol(char *volName,short vRefNum);
pascal OSErr Create(ConstStr255Param fileName,short vRefNum,OSType creator,
OSType fileType);
OSErr create(char *fileName,short vRefNum,OSType creator,OSType fileType);
pascal OSErr FSDelete(ConstStr255Param fileName,short vRefNum);
OSErr fsdelete(char *fileName,short vRefNum);
pascal OSErr OpenRF(ConstStr255Param fileName,short vRefNum,short *refNum);
OSErr openrf(char *fileName,short vRefNum,short *refNum);
pascal OSErr Rename(ConstStr255Param oldName,short vRefNum,ConstStr255Param newName);
OSErr fsrename(char *oldName,short vRefNum,char *newName);
pascal OSErr SetFInfo(ConstStr255Param fileName,short vRefNum,const FInfo *fndrInfo);
OSErr setfinfo(char *fileName,short vRefNum,FInfo *fndrInfo);
pascal OSErr SetFLock(ConstStr255Param fileName,short vRefNum);
OSErr setflock(char *fileName,short vRefNum);
pascal OSErr RstFLock(ConstStr255Param fileName,short vRefNum);
OSErr rstflock(char *fileName,short vRefNum);
pascal OSErr Allocate(short refNum,long *count);
pascal OSErr GetEOF(short refNum,long *logEOF);
pascal OSErr SetEOF(short refNum,long logEOF);
pascal OSErr GetFPos(short refNum,long *filePos);
pascal OSErr SetFPos(short refNum,short posMode,long posOff);
pascal OSErr GetVRefNum(short fileRefNum,short *vRefNum);
pascal OSErr PBOpenWD(WDPBPtr paramBlock,Boolean async);
#pragma parameter __D0 PBOpenWDSync(__A0)
pascal OSErr PBOpenWDSync(WDPBPtr paramBlock)
= {0x7001,0xA260};
#pragma parameter __D0 PBOpenWDAsync(__A0)
pascal OSErr PBOpenWDAsync(WDPBPtr paramBlock)
= {0x7001,0xA660};
pascal OSErr PBCloseWD(WDPBPtr paramBlock,Boolean async);
#pragma parameter __D0 PBCloseWDSync(__A0)
pascal OSErr PBCloseWDSync(WDPBPtr paramBlock)
= {0x7002,0xA260};
#pragma parameter __D0 PBCloseWDAsync(__A0)
pascal OSErr PBCloseWDAsync(WDPBPtr paramBlock)
= {0x7002,0xA660};
pascal OSErr PBHSetVol(WDPBPtr paramBlock,Boolean async);
#pragma parameter __D0 PBHSetVolSync(__A0)
pascal OSErr PBHSetVolSync(WDPBPtr paramBlock)
= 0xA215;
#pragma parameter __D0 PBHSetVolAsync(__A0)
pascal OSErr PBHSetVolAsync(WDPBPtr paramBlock)
= 0xA615;
pascal OSErr PBHGetVol(WDPBPtr paramBlock,Boolean async);
#pragma parameter __D0 PBHGetVolSync(__A0)
pascal OSErr PBHGetVolSync(WDPBPtr paramBlock)
= 0xA214;
#pragma parameter __D0 PBHGetVolAsync(__A0)
pascal OSErr PBHGetVolAsync(WDPBPtr paramBlock)
= 0xA614;
pascal OSErr PBCatMove(CMovePBPtr paramBlock,Boolean async);
#pragma parameter __D0 PBCatMoveSync(__A0)
pascal OSErr PBCatMoveSync(CMovePBPtr paramBlock)
= {0x7005,0xA260};
#pragma parameter __D0 PBCatMoveAsync(__A0)
pascal OSErr PBCatMoveAsync(CMovePBPtr paramBlock)
= {0x7005,0xA660};
pascal OSErr PBDirCreate(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBDirCreateSync(__A0)
pascal OSErr PBDirCreateSync(HParmBlkPtr paramBlock)
= {0x7006,0xA260};
#pragma parameter __D0 PBDirCreateAsync(__A0)
pascal OSErr PBDirCreateAsync(HParmBlkPtr paramBlock)
= {0x7006,0xA660};
pascal OSErr PBGetWDInfo(WDPBPtr paramBlock,Boolean async);
#pragma parameter __D0 PBGetWDInfoSync(__A0)
pascal OSErr PBGetWDInfoSync(WDPBPtr paramBlock)
= {0x7007,0xA260};
#pragma parameter __D0 PBGetWDInfoAsync(__A0)
pascal OSErr PBGetWDInfoAsync(WDPBPtr paramBlock)
= {0x7007,0xA660};
pascal OSErr PBGetFCBInfo(FCBPBPtr paramBlock,Boolean async);
#pragma parameter __D0 PBGetFCBInfoSync(__A0)
pascal OSErr PBGetFCBInfoSync(FCBPBPtr paramBlock)
= {0x7008,0xA260};
#pragma parameter __D0 PBGetFCBInfoAsync(__A0)
pascal OSErr PBGetFCBInfoAsync(FCBPBPtr paramBlock)
= {0x7008,0xA660};
pascal OSErr PBGetCatInfo(CInfoPBPtr paramBlock,Boolean async);
#pragma parameter __D0 PBGetCatInfoSync(__A0)
pascal OSErr PBGetCatInfoSync(CInfoPBPtr paramBlock)
= {0x7009,0xA260};
#pragma parameter __D0 PBGetCatInfoAsync(__A0)
pascal OSErr PBGetCatInfoAsync(CInfoPBPtr paramBlock)
= {0x7009,0xA660};
pascal OSErr PBSetCatInfo(CInfoPBPtr paramBlock,Boolean async);
#pragma parameter __D0 PBSetCatInfoSync(__A0)
pascal OSErr PBSetCatInfoSync(CInfoPBPtr paramBlock)
= {0x700A,0xA260};
#pragma parameter __D0 PBSetCatInfoAsync(__A0)
pascal OSErr PBSetCatInfoAsync(CInfoPBPtr paramBlock)
= {0x700A,0xA660};
pascal OSErr PBAllocContig(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBAllocContigSync(__A0)
pascal OSErr PBAllocContigSync(ParmBlkPtr paramBlock)
= 0xA210;
#pragma parameter __D0 PBAllocContigAsync(__A0)
pascal OSErr PBAllocContigAsync(ParmBlkPtr paramBlock)
= 0xA610;
pascal OSErr PBLockRange(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBLockRangeSync(__A0)
pascal OSErr PBLockRangeSync(ParmBlkPtr paramBlock)
= {0x7010,0xA260};
#pragma parameter __D0 PBLockRangeAsync(__A0)
pascal OSErr PBLockRangeAsync(ParmBlkPtr paramBlock)
= {0x7010,0xA660};
pascal OSErr PBUnlockRange(ParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBUnlockRangeSync(__A0)
pascal OSErr PBUnlockRangeSync(ParmBlkPtr paramBlock)
= {0x7011,0xA260};
#pragma parameter __D0 PBUnlockRangeAsync(__A0)
pascal OSErr PBUnlockRangeAsync(ParmBlkPtr paramBlock)
= {0x7011,0xA660};
pascal OSErr PBSetVInfo(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBSetVInfoSync(__A0)
pascal OSErr PBSetVInfoSync(HParmBlkPtr paramBlock)
= {0x700B,0xA260};
#pragma parameter __D0 PBSetVInfoAsync(__A0)
pascal OSErr PBSetVInfoAsync(HParmBlkPtr paramBlock)
= {0x700B,0xA660};
pascal OSErr PBHGetVInfo(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBHGetVInfoSync(__A0)
pascal OSErr PBHGetVInfoSync(HParmBlkPtr paramBlock)
= 0xA207;
#pragma parameter __D0 PBHGetVInfoAsync(__A0)
pascal OSErr PBHGetVInfoAsync(HParmBlkPtr paramBlock)
= 0xA607;
pascal OSErr PBHOpen(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBHOpenSync(__A0)
pascal OSErr PBHOpenSync(HParmBlkPtr paramBlock)
= 0xA200;
#pragma parameter __D0 PBHOpenAsync(__A0)
pascal OSErr PBHOpenAsync(HParmBlkPtr paramBlock)
= 0xA600;
pascal OSErr PBHOpenRF(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBHOpenRFSync(__A0)
pascal OSErr PBHOpenRFSync(HParmBlkPtr paramBlock)
= 0xA20A;
#pragma parameter __D0 PBHOpenRFAsync(__A0)
pascal OSErr PBHOpenRFAsync(HParmBlkPtr paramBlock)
= 0xA60A;
pascal OSErr PBHOpenDF(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBHOpenDFSync(__A0)
pascal OSErr PBHOpenDFSync(HParmBlkPtr paramBlock)
= {0x701A,0xA260};
#pragma parameter __D0 PBHOpenDFAsync(__A0)
pascal OSErr PBHOpenDFAsync(HParmBlkPtr paramBlock)
= {0x701A,0xA660};
pascal OSErr PBHCreate(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBHCreateSync(__A0)
pascal OSErr PBHCreateSync(HParmBlkPtr paramBlock)
= 0xA208;
#pragma parameter __D0 PBHCreateAsync(__A0)
pascal OSErr PBHCreateAsync(HParmBlkPtr paramBlock)
= 0xA608;
pascal OSErr PBHDelete(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBHDeleteSync(__A0)
pascal OSErr PBHDeleteSync(HParmBlkPtr paramBlock)
= 0xA209;
#pragma parameter __D0 PBHDeleteAsync(__A0)
pascal OSErr PBHDeleteAsync(HParmBlkPtr paramBlock)
= 0xA609;
pascal OSErr PBHRename(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBHRenameSync(__A0)
pascal OSErr PBHRenameSync(HParmBlkPtr paramBlock)
= 0xA20B;
#pragma parameter __D0 PBHRenameAsync(__A0)
pascal OSErr PBHRenameAsync(HParmBlkPtr paramBlock)
= 0xA60B;
pascal OSErr PBHRstFLock(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBHRstFLockSync(__A0)
pascal OSErr PBHRstFLockSync(HParmBlkPtr paramBlock)
= 0xA242;
#pragma parameter __D0 PBHRstFLockAsync(__A0)
pascal OSErr PBHRstFLockAsync(HParmBlkPtr paramBlock)
= 0xA642;
pascal OSErr PBHSetFLock(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBHSetFLockSync(__A0)
pascal OSErr PBHSetFLockSync(HParmBlkPtr paramBlock)
= 0xA241;
#pragma parameter __D0 PBHSetFLockAsync(__A0)
pascal OSErr PBHSetFLockAsync(HParmBlkPtr paramBlock)
= 0xA641;
pascal OSErr PBHGetFInfo(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBHGetFInfoSync(__A0)
pascal OSErr PBHGetFInfoSync(HParmBlkPtr paramBlock)
= 0xA20C;
#pragma parameter __D0 PBHGetFInfoAsync(__A0)
pascal OSErr PBHGetFInfoAsync(HParmBlkPtr paramBlock)
= 0xA60C;
pascal OSErr PBHSetFInfo(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBHSetFInfoSync(__A0)
pascal OSErr PBHSetFInfoSync(HParmBlkPtr paramBlock)
= 0xA20D;
#pragma parameter __D0 PBHSetFInfoAsync(__A0)
pascal OSErr PBHSetFInfoAsync(HParmBlkPtr paramBlock)
= 0xA60D;
pascal OSErr PBMakeFSSpec(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBMakeFSSpecSync(__A0)
pascal OSErr PBMakeFSSpecSync(HParmBlkPtr paramBlock)
= {0x701B,0xA260};
#pragma parameter __D0 PBMakeFSSpecAsync(__A0)
pascal OSErr PBMakeFSSpecAsync(HParmBlkPtr paramBlock)
= {0x701B,0xA660};
pascal void FInitQueue(void)
= 0xA016;
pascal OSErr HGetVol(StringPtr volName,short *vRefNum,long *dirID);
pascal OSErr HSetVol(StringPtr volName,short vRefNum,long dirID);
pascal OSErr HOpen(short vRefNum,long dirID,ConstStr255Param fileName,char permission,
short *refNum);
pascal OSErr HOpenDF(short vRefNum,long dirID,ConstStr255Param fileName,
char permission,short *refNum);
pascal OSErr HOpenRF(short vRefNum,long dirID,ConstStr255Param fileName,
char permission,short *refNum);
pascal OSErr AllocContig(short refNum,long *count);
pascal OSErr HCreate(short vRefNum,long dirID,ConstStr255Param fileName,
OSType creator,OSType fileType);
pascal OSErr DirCreate(short vRefNum,long parentDirID,ConstStr255Param directoryName,
long *createdDirID);
pascal OSErr HDelete(short vRefNum,long dirID,ConstStr255Param fileName);
pascal OSErr HGetFInfo(short vRefNum,long dirID,ConstStr255Param fileName,
FInfo *fndrInfo);
pascal OSErr HSetFInfo(short vRefNum,long dirID,ConstStr255Param fileName,
const FInfo *fndrInfo);
pascal OSErr HSetFLock(short vRefNum,long dirID,ConstStr255Param fileName);
pascal OSErr HRstFLock(short vRefNum,long dirID,ConstStr255Param fileName);
pascal OSErr HRename(short vRefNum,long dirID,ConstStr255Param oldName,
ConstStr255Param newName);
pascal OSErr CatMove(short vRefNum,long dirID,ConstStr255Param oldName,
long newDirID,ConstStr255Param newName);
pascal OSErr OpenWD(short vRefNum,long dirID,long procID,short *wdRefNum);
pascal OSErr CloseWD(short wdRefNum);
pascal OSErr GetWDInfo(short wdRefNum,short *vRefNum,long *dirID,long *procID);
pascal OSErr PBHGetVolParms(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBHGetVolParmsSync(__A0)
pascal OSErr PBHGetVolParmsSync(HParmBlkPtr paramBlock)
= {0x7030,0xA260};
#pragma parameter __D0 PBHGetVolParmsAsync(__A0)
pascal OSErr PBHGetVolParmsAsync(HParmBlkPtr paramBlock)
= {0x7030,0xA660};
pascal OSErr PBHGetLogInInfo(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBHGetLogInInfoSync(__A0)
pascal OSErr PBHGetLogInInfoSync(HParmBlkPtr paramBlock)
= {0x7031,0xA260};
#pragma parameter __D0 PBHGetLogInInfoAsync(__A0)
pascal OSErr PBHGetLogInInfoAsync(HParmBlkPtr paramBlock)
= {0x7031,0xA660};
pascal OSErr PBHGetDirAccess(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBHGetDirAccessSync(__A0)
pascal OSErr PBHGetDirAccessSync(HParmBlkPtr paramBlock)
= {0x7032,0xA260};
#pragma parameter __D0 PBHGetDirAccessAsync(__A0)
pascal OSErr PBHGetDirAccessAsync(HParmBlkPtr paramBlock)
= {0x7032,0xA660};
pascal OSErr PBHSetDirAccess(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBHSetDirAccessSync(__A0)
pascal OSErr PBHSetDirAccessSync(HParmBlkPtr paramBlock)
= {0x7033,0xA260};
#pragma parameter __D0 PBHSetDirAccessAsync(__A0)
pascal OSErr PBHSetDirAccessAsync(HParmBlkPtr paramBlock)
= {0x7033,0xA660};
pascal OSErr PBHMapID(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBHMapIDSync(__A0)
pascal OSErr PBHMapIDSync(HParmBlkPtr paramBlock)
= {0x7034,0xA260};
#pragma parameter __D0 PBHMapIDAsync(__A0)
pascal OSErr PBHMapIDAsync(HParmBlkPtr paramBlock)
= {0x7034,0xA660};
pascal OSErr PBHMapName(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBHMapNameSync(__A0)
pascal OSErr PBHMapNameSync(HParmBlkPtr paramBlock)
= {0x7035,0xA260};
#pragma parameter __D0 PBHMapNameAsync(__A0)
pascal OSErr PBHMapNameAsync(HParmBlkPtr paramBlock)
= {0x7035,0xA660};
pascal OSErr PBHCopyFile(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBHCopyFileSync(__A0)
pascal OSErr PBHCopyFileSync(HParmBlkPtr paramBlock)
= {0x7036,0xA260};
#pragma parameter __D0 PBHCopyFileAsync(__A0)
pascal OSErr PBHCopyFileAsync(HParmBlkPtr paramBlock)
= {0x7036,0xA660};
pascal OSErr PBHMoveRename(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBHMoveRenameSync(__A0)
pascal OSErr PBHMoveRenameSync(HParmBlkPtr paramBlock)
= {0x7037,0xA260};
#pragma parameter __D0 PBHMoveRenameAsync(__A0)
pascal OSErr PBHMoveRenameAsync(HParmBlkPtr paramBlock)
= {0x7037,0xA660};
pascal OSErr PBHOpenDeny(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBHOpenDenySync(__A0)
pascal OSErr PBHOpenDenySync(HParmBlkPtr paramBlock)
= {0x7038,0xA260};
#pragma parameter __D0 PBHOpenDenyAsync(__A0)
pascal OSErr PBHOpenDenyAsync(HParmBlkPtr paramBlock)
= {0x7038,0xA660};
pascal OSErr PBHOpenRFDeny(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBHOpenRFDenySync(__A0)
pascal OSErr PBHOpenRFDenySync(HParmBlkPtr paramBlock)
= {0x7039,0xA260};
#pragma parameter __D0 PBHOpenRFDenyAsync(__A0)
pascal OSErr PBHOpenRFDenyAsync(HParmBlkPtr paramBlock)
= {0x7039,0xA660};
pascal OSErr PBExchangeFiles(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBExchangeFilesSync(__A0)
pascal OSErr PBExchangeFilesSync(HParmBlkPtr paramBlock)
= {0x7017,0xA260};
#pragma parameter __D0 PBExchangeFilesAsync(__A0)
pascal OSErr PBExchangeFilesAsync(HParmBlkPtr paramBlock)
= {0x7017,0xA660};
pascal OSErr PBCreateFileIDRef(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBCreateFileIDRefSync(__A0)
pascal OSErr PBCreateFileIDRefSync(HParmBlkPtr paramBlock)
= {0x7014,0xA260};
#pragma parameter __D0 PBCreateFileIDRefAsync(__A0)
pascal OSErr PBCreateFileIDRefAsync(HParmBlkPtr paramBlock)
= {0x7014,0xA660};
pascal OSErr PBResolveFileIDRef(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBResolveFileIDRefSync(__A0)
pascal OSErr PBResolveFileIDRefSync(HParmBlkPtr paramBlock)
= {0x7016,0xA260};
#pragma parameter __D0 PBResolveFileIDRefAsync(__A0)
pascal OSErr PBResolveFileIDRefAsync(HParmBlkPtr paramBlock)
= {0x7016,0xA660};
pascal OSErr PBDeleteFileIDRef(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBDeleteFileIDRefSync(__A0)
pascal OSErr PBDeleteFileIDRefSync(HParmBlkPtr paramBlock)
= {0x7015,0xA260};
#pragma parameter __D0 PBDeleteFileIDRefAsync(__A0)
pascal OSErr PBDeleteFileIDRefAsync(HParmBlkPtr paramBlock)
= {0x7015,0xA660};
pascal OSErr PBGetForeignPrivs(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBGetForeignPrivsSync(__A0)
pascal OSErr PBGetForeignPrivsSync(HParmBlkPtr paramBlock)
= {0x7060,0xA260};
#pragma parameter __D0 PBGetForeignPrivsAsync(__A0)
pascal OSErr PBGetForeignPrivsAsync(HParmBlkPtr paramBlock)
= {0x7060,0xA660};
pascal OSErr PBSetForeignPrivs(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBSetForeignPrivsSync(__A0)
pascal OSErr PBSetForeignPrivsSync(HParmBlkPtr paramBlock)
= {0x7061,0xA260};
#pragma parameter __D0 PBSetForeignPrivsAsync(__A0)
pascal OSErr PBSetForeignPrivsAsync(HParmBlkPtr paramBlock)
= {0x7061,0xA660};
#pragma parameter __D0 PBDTGetPath(__A0)
pascal OSErr PBDTGetPath(DTPBPtr paramBlock)
= {0x7020,0xA260};
#pragma parameter __D0 PBDTCloseDown(__A0)
pascal OSErr PBDTCloseDown(DTPBPtr paramBlock)
= {0x7021,0xA260};
pascal OSErr PBDTAddIcon(DTPBPtr paramBlock,Boolean async);
#pragma parameter __D0 PBDTAddIconSync(__A0)
pascal OSErr PBDTAddIconSync(DTPBPtr paramBlock)
= {0x7022,0xA260};
#pragma parameter __D0 PBDTAddIconAsync(__A0)
pascal OSErr PBDTAddIconAsync(DTPBPtr paramBlock)
= {0x7022,0xA660};
pascal OSErr PBDTGetIcon(DTPBPtr paramBlock,Boolean async);
#pragma parameter __D0 PBDTGetIconSync(__A0)
pascal OSErr PBDTGetIconSync(DTPBPtr paramBlock)
= {0x7023,0xA260};
#pragma parameter __D0 PBDTGetIconAsync(__A0)
pascal OSErr PBDTGetIconAsync(DTPBPtr paramBlock)
= {0x7023,0xA660};
pascal OSErr PBDTGetIconInfo(DTPBPtr paramBlock,Boolean async);
#pragma parameter __D0 PBDTGetIconInfoSync(__A0)
pascal OSErr PBDTGetIconInfoSync(DTPBPtr paramBlock)
= {0x7024,0xA260};
#pragma parameter __D0 PBDTGetIconInfoAsync(__A0)
pascal OSErr PBDTGetIconInfoAsync(DTPBPtr paramBlock)
= {0x7024,0xA660};
pascal OSErr PBDTAddAPPL(DTPBPtr paramBlock,Boolean async);
#pragma parameter __D0 PBDTAddAPPLSync(__A0)
pascal OSErr PBDTAddAPPLSync(DTPBPtr paramBlock)
= {0x7025,0xA260};
#pragma parameter __D0 PBDTAddAPPLAsync(__A0)
pascal OSErr PBDTAddAPPLAsync(DTPBPtr paramBlock)
= {0x7025,0xA660};
pascal OSErr PBDTRemoveAPPL(DTPBPtr paramBlock,Boolean async);
#pragma parameter __D0 PBDTRemoveAPPLSync(__A0)
pascal OSErr PBDTRemoveAPPLSync(DTPBPtr paramBlock)
= {0x7026,0xA260};
#pragma parameter __D0 PBDTRemoveAPPLAsync(__A0)
pascal OSErr PBDTRemoveAPPLAsync(DTPBPtr paramBlock)
= {0x7026,0xA660};
pascal OSErr PBDTGetAPPL(DTPBPtr paramBlock,Boolean async);
#pragma parameter __D0 PBDTGetAPPLSync(__A0)
pascal OSErr PBDTGetAPPLSync(DTPBPtr paramBlock)
= {0x7027,0xA260};
#pragma parameter __D0 PBDTGetAPPLAsync(__A0)
pascal OSErr PBDTGetAPPLAsync(DTPBPtr paramBlock)
= {0x7027,0xA660};
pascal OSErr PBDTSetComment(DTPBPtr paramBlock,Boolean async);
#pragma parameter __D0 PBDTSetCommentSync(__A0)
pascal OSErr PBDTSetCommentSync(DTPBPtr paramBlock)
= {0x7028,0xA260};
#pragma parameter __D0 PBDTSetCommentAsync(__A0)
pascal OSErr PBDTSetCommentAsync(DTPBPtr paramBlock)
= {0x7028,0xA660};
pascal OSErr PBDTRemoveComment(DTPBPtr paramBlock,Boolean async);
#pragma parameter __D0 PBDTRemoveCommentSync(__A0)
pascal OSErr PBDTRemoveCommentSync(DTPBPtr paramBlock)
= {0x7029,0xA260};
#pragma parameter __D0 PBDTRemoveCommentAsync(__A0)
pascal OSErr PBDTRemoveCommentAsync(DTPBPtr paramBlock)
= {0x7029,0xA660};
pascal OSErr PBDTGetComment(DTPBPtr paramBlock,Boolean async);
#pragma parameter __D0 PBDTGetCommentSync(__A0)
pascal OSErr PBDTGetCommentSync(DTPBPtr paramBlock)
= {0x702A,0xA260};
#pragma parameter __D0 PBDTGetCommentAsync(__A0)
pascal OSErr PBDTGetCommentAsync(DTPBPtr paramBlock)
= {0x702A,0xA660};
pascal OSErr PBDTFlush(DTPBPtr paramBlock,Boolean async);
#pragma parameter __D0 PBDTFlushSync(__A0)
pascal OSErr PBDTFlushSync(DTPBPtr paramBlock)
= {0x702B,0xA260};
#pragma parameter __D0 PBDTFlushAsync(__A0)
pascal OSErr PBDTFlushAsync(DTPBPtr paramBlock)
= {0x702B,0xA660};
pascal OSErr PBDTReset(DTPBPtr paramBlock,Boolean async);
#pragma parameter __D0 PBDTResetSync(__A0)
pascal OSErr PBDTResetSync(DTPBPtr paramBlock)
= {0x702C,0xA260};
#pragma parameter __D0 PBDTResetAsync(__A0)
pascal OSErr PBDTResetAsync(DTPBPtr paramBlock)
= {0x702C,0xA660};
pascal OSErr PBDTGetInfo(DTPBPtr paramBlock,Boolean async);
#pragma parameter __D0 PBDTGetInfoSync(__A0)
pascal OSErr PBDTGetInfoSync(DTPBPtr paramBlock)
= {0x702D,0xA260};
#pragma parameter __D0 PBDTGetInfoAsync(__A0)
pascal OSErr PBDTGetInfoAsync(DTPBPtr paramBlock)
= {0x702D,0xA660};
#pragma parameter __D0 PBDTOpenInform(__A0)
pascal OSErr PBDTOpenInform(DTPBPtr paramBlock)
= {0x702E,0xA060};
pascal OSErr PBDTDelete(DTPBPtr paramBlock,Boolean async);
#pragma parameter __D0 PBDTDeleteSync(__A0)
pascal OSErr PBDTDeleteSync(DTPBPtr paramBlock)
= {0x702F,0xA060};
#pragma parameter __D0 PBDTDeleteAsync(__A0)
pascal OSErr PBDTDeleteAsync(DTPBPtr paramBlock)
= {0x702F,0xA460};
#pragma parameter __D0 PBGetVolMountInfoSize(__A0)
pascal OSErr PBGetVolMountInfoSize(ParmBlkPtr paramBlock)
= {0x703F,0xA260};
#pragma parameter __D0 PBGetVolMountInfo(__A0)
pascal OSErr PBGetVolMountInfo(ParmBlkPtr paramBlock)
= {0x7040,0xA260};
#pragma parameter __D0 PBVolumeMount(__A0)
pascal OSErr PBVolumeMount(ParmBlkPtr paramBlock)
= {0x7041,0xA260};
pascal OSErr FSMakeFSSpec(short vRefNum,long dirID,ConstStr255Param fileName,
FSSpecPtr spec)
= {0x303C,0x0001,0xAA52};
pascal OSErr FSpOpenDF(const FSSpec *spec,char permission,short *refNum)
= {0x303C,0x0002,0xAA52};
pascal OSErr FSpOpenRF(const FSSpec *spec,char permission,short *refNum)
= {0x303C,0x0003,0xAA52};
pascal OSErr FSpCreate(const FSSpec *spec,OSType creator,OSType fileType,
ScriptCode scriptTag)
= {0x303C,0x0004,0xAA52};
pascal OSErr FSpDirCreate(const FSSpec *spec,ScriptCode scriptTag,long *createdDirID)
= {0x303C,0x0005,0xAA52};
pascal OSErr FSpDelete(const FSSpec *spec)
= {0x303C,0x0006,0xAA52};
pascal OSErr FSpGetFInfo(const FSSpec *spec,FInfo *fndrInfo)
= {0x303C,0x0007,0xAA52};
pascal OSErr FSpSetFInfo(const FSSpec *spec,const FInfo *fndrInfo)
= {0x303C,0x0008,0xAA52};
pascal OSErr FSpSetFLock(const FSSpec *spec)
= {0x303C,0x0009,0xAA52};
pascal OSErr FSpRstFLock(const FSSpec *spec)
= {0x303C,0x000A,0xAA52};
pascal OSErr FSpRename(const FSSpec *spec,ConstStr255Param newName)
= {0x303C,0x000B,0xAA52};
pascal OSErr FSpCatMove(const FSSpec *source,const FSSpec *dest)
= {0x303C,0x000C,0xAA52};
pascal OSErr FSpExchangeFiles(const FSSpec *source,const FSSpec *dest)
= {0x303C,0x000F,0xAA52};
pascal OSErr PBGetAltAccess(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBGetAltAccessSync(__A0)
pascal OSErr PBGetAltAccessSync(HParmBlkPtr paramBlock)
= {0x7060,0xA060};
#pragma parameter __D0 PBGetAltAccessAsync(__A0)
pascal OSErr PBGetAltAccessAsync(HParmBlkPtr paramBlock)
= {0x7060,0xA460};
pascal OSErr PBSetAltAccess(HParmBlkPtr paramBlock,Boolean async);
#pragma parameter __D0 PBSetAltAccessSync(__A0)
pascal OSErr PBSetAltAccessSync(HParmBlkPtr paramBlock)
= {0x7061,0xA060};
#pragma parameter __D0 PBSetAltAccessAsync(__A0)
pascal OSErr PBSetAltAccessAsync(HParmBlkPtr paramBlock)
= {0x7061,0xA460};
# 7 "crtlocal.h" 2
# 1 "Menus.h" 1
# 190 "Menus.h"
# 8 "crtlocal.h" 2
# 1 "Fonts.h" 1
# 272 "Fonts.h"
# 9 "crtlocal.h" 2
# 1 "TextEdit.h" 1
# 347 "TextEdit.h"
# 10 "crtlocal.h" 2
extern struct crt_fd_tab { long fd; short flags; } crt_fd_tab[];
extern char crt_defpath[];
extern short crt_ioVRefNum;
extern WindowPtr crt_myWindow;
extern TEHandle crt_TEH;
StringPtr cnv_unix_name(const char *nam);
# 41 "console.c" 2
static WindowRecord crt_wRecord;
static int linesInFolder;
static MenuHandle myMenus[3];
static ControlHandle vScroll;
int SetUpWindows(Str255 name)
{
Rect viewRect;
FontInfo myInfo;
GrafPort myPort;
OpenPort(&myPort);
SetPort(&myPort);
TextFont(monaco);
TextSize(9);
GetFontInfo(&myInfo);
ClosePort(&myPort);
viewRect.left = 0;
viewRect.top = 32;
viewRect.right = viewRect.left+82*myInfo.widMax+15 ;
viewRect.bottom = viewRect.top+25*(myInfo.ascent+myInfo.descent+myInfo.leading)+15 ;
OffsetRect(&viewRect,
(qd.screenBits.bounds.right-viewRect.right)/2,
(qd.screenBits.bounds.bottom-viewRect.bottom)/2);
crt_myWindow = NewWindow(&crt_wRecord,&viewRect,name,1,0,(WindowPtr) -1L,1,0);
SetPort(crt_myWindow);
TextFont(monaco);
TextSize(9);
viewRect = qd.thePort->portRect;
viewRect.left = viewRect.right-15;
viewRect.right += 1;
viewRect.bottom -= 14;
viewRect.top -= 1;
vScroll = NewControl( crt_myWindow, &viewRect, "\p", 1, 0, 0, 0, scrollBarProc, 0L);
viewRect = qd.thePort->portRect;
viewRect.right -= 15 ;
viewRect.bottom -= 15 ;
InsetRect(&viewRect, 4, 4);
crt_TEH = TEStylNew(&viewRect, &viewRect);
(**crt_TEH).viewRect = qd.thePort->portRect;
(**crt_TEH).viewRect.right -= 15 ;
(**crt_TEH).viewRect.bottom -= 15 ;
InsetRect(&(**crt_TEH).viewRect, 4, 4);
linesInFolder = ((**crt_TEH).viewRect.bottom-(**crt_TEH).viewRect.top)/(**crt_TEH).lineHeight;
(**crt_TEH).viewRect.bottom = (**crt_TEH).viewRect.top + (**crt_TEH).lineHeight*linesInFolder;
(**crt_TEH).destRect.right = (**crt_TEH).viewRect.right;
TECalText(crt_TEH);
}
int AdjustText (void)
{
int oldScroll, newScroll, delta;
oldScroll = (**crt_TEH).viewRect.top - (**crt_TEH).destRect.top;
newScroll = GetCtlValue(vScroll) * (**crt_TEH).lineHeight;
delta = oldScroll - newScroll;
if (delta != 0)
TEScroll(0, delta, crt_TEH);
}
# 148 "console.c"
int DoMouseDown (int windowPart, WindowPtr whichWindow, EventRecord *myEvent)
{
switch (windowPart) {
case inGoAway:
if ( ((crt_myWindow != 0 ) && (whichWindow == crt_myWindow)) )
if (TrackGoAway(crt_myWindow, myEvent->where))
{
HideWindow(crt_myWindow);
TESetSelect(0, (**crt_TEH).teLength, crt_TEH);
TEDelete(crt_TEH);
{
register int n;
n = (**crt_TEH).nLines-linesInFolder;
if ((**crt_TEH).teLength > 0 && (*((**crt_TEH).hText))[(**crt_TEH).teLength-1]=='\r')
n++;
SetCtlMax(vScroll, n > 0 ? n : 0);
}
}
break;
case inMenuBar:
return(DoCommand(MenuSelect(myEvent->where)));
case inSysWindow:
SystemClick(myEvent, whichWindow);
break;
case inDrag:
if ( ((crt_myWindow != 0 ) && (whichWindow == crt_myWindow)) )
{
Rect dragRect = { 0, 0, 1024, 1024 };
DragWindow(whichWindow, myEvent->where, &dragRect);
}
break;
case inGrow:
if ( ((crt_myWindow != 0 ) && (whichWindow == crt_myWindow)) )
{
Point p = myEvent->where;
GrafPtr savePort;
long theResult;
Rect oldHorizBar;
Rect r;
GetPort(&savePort);
SetPort(whichWindow);
oldHorizBar = whichWindow->portRect;
oldHorizBar.top = oldHorizBar.bottom - (15 +1);
SetRect(&r, 80, 80, qd.screenBits.bounds.right, qd.screenBits.bounds.bottom);
theResult = GrowWindow(whichWindow, p, &r);
if (theResult == 0)
return;
SizeWindow( whichWindow, LoWord(theResult), HiWord(theResult), false);
InvalRect(&whichWindow->portRect);
(**crt_TEH).viewRect = whichWindow->portRect;
(**crt_TEH).viewRect.right -= 15 ;
(**crt_TEH).viewRect.bottom -= 15 ;
InsetRect(&(**crt_TEH).viewRect, 4, 4);
linesInFolder = ((**crt_TEH).viewRect.bottom-(**crt_TEH).viewRect.top)/(**crt_TEH).lineHeight;
(**crt_TEH).viewRect.bottom = (**crt_TEH).viewRect.top + (**crt_TEH).lineHeight*linesInFolder;
(**crt_TEH).destRect.right = (**crt_TEH).viewRect.right;
TECalText(crt_TEH);
EraseRect(&oldHorizBar);
MoveControl(vScroll, whichWindow->portRect.right - 15 , whichWindow->portRect.top-1);
SizeControl(vScroll, 15 +1, whichWindow->portRect.bottom - whichWindow->portRect.top-(15 -2));
r = (**vScroll).contrlRect;
ValidRect(&r);
{
register int n;
n = (**crt_TEH).nLines-linesInFolder;
if ((**crt_TEH).teLength > 0 && (*((**crt_TEH).hText))[(**crt_TEH).teLength-1]=='\r')
n++;
SetCtlMax(vScroll, n > 0 ? n : 0);
}
AdjustText();
SetPort(savePort);
}
break;
case inContent:
if (whichWindow != FrontWindow())
SelectWindow(whichWindow);
else if ( ((crt_myWindow != 0 ) && (whichWindow == crt_myWindow)) )
{
int cntlCode;
ControlHandle theControl;
int pageSize;
GrafPtr savePort;
GetPort(&savePort);
SetPort(whichWindow);
GlobalToLocal(&myEvent->where);
if ((cntlCode = FindControl(myEvent->where, whichWindow, &theControl)) == 0) {
if (PtInRect(myEvent->where, &(**crt_TEH).viewRect))
TEClick(myEvent->where, (myEvent->modifiers & shiftKey)!=0, crt_TEH);
} else if (cntlCode == inThumb) {
TrackControl(theControl, myEvent->where, 0L);
AdjustText();
} else
TrackControl(theControl, myEvent->where,
0);
SetPort(savePort);
}
break;
}
}
int ShowSelect (void)
{
register int topLine, bottomLine, theLine;
register int n;
n = (**crt_TEH).nLines-linesInFolder;
if ((**crt_TEH).teLength > 0 && (*((**crt_TEH).hText))[(**crt_TEH).teLength-1]=='\r')
n++;
SetCtlMax(vScroll, n > 0 ? n : 0);
AdjustText();
topLine = GetCtlValue(vScroll);
bottomLine = topLine + linesInFolder;
if ((**crt_TEH).selStart < (**crt_TEH).lineStarts[topLine] ||
(**crt_TEH).selStart >= (**crt_TEH).lineStarts[bottomLine]) {
for (theLine = 0; (**crt_TEH).selStart >= (**crt_TEH).lineStarts[theLine]; theLine++)
;
SetCtlValue(vScroll, theLine - linesInFolder / 2);
AdjustText();
}
}
int SetUpMenus(void)
{
int i;
myMenus[ 0 ] = NewMenu( 128 , "\p\024");
AppendMenu(myMenus[ 0 ], "\pAbout ...");
AddResMenu(myMenus[ 0 ], 'DRVR');
myMenus[ 1 ] = NewMenu( 129 , "\pFile");
AppendMenu(myMenus[ 1 ], "\pQuit/Q");
myMenus[ 2 ] = NewMenu( 130 , "\pEdit");
AppendMenu(myMenus[ 2 ], "\pUndo/Z;-;Cut/X;Copy/C;Paste/V;Clear;Select All/A");
DisableItem(myMenus[ 2 ], 1 );
for ((i= 0 ); (i<= 2 ); i++)
InsertMenu(myMenus[i], 0) ;
DrawMenuBar();
}
int DoCommand(long mResult)
{
int theItem;
Str255 name;
theItem = LoWord(mResult);
switch (HiWord(mResult))
{
case 128 :
if (myMenus[ 0 ])
{
GetItem(myMenus[ 0 ], theItem, name);
OpenDeskAcc(name);
SetPort(crt_myWindow);
break;
}
case 129 :
ExitToShell();
break;
case 130 :
if (SystemEdit(theItem-1) == 0) {
switch (theItem) {
case 3 :
ZeroScrap();
TECut(crt_TEH);
break;
case 4 :
ZeroScrap();
TECopy(crt_TEH);
break;
case 5 :
TEPaste(crt_TEH);
break;
case 6 :
TEDelete(crt_TEH);
break;
case 7 :
TESetSelect(0, 32767, crt_TEH);
break;
}
ShowSelect();
}
break;
}
HiliteMenu(0);
return(1);
}
int MaintainCursor(void)
{
Point pt;
WindowPeek wPtr;
GrafPtr savePort;
if ( ((crt_myWindow != 0 ) && ((WindowPtr)(wPtr=(WindowPeek)FrontWindow()) == crt_myWindow)) ) {
GetPort(&savePort);
SetPort((GrafPtr)wPtr);
GetMouse(&pt);
if (PtInRect(pt, &(**crt_TEH).viewRect ) )
SetCursor( *GetCursor(1));
else SetCursor(&qd.arrow);
SetPort(savePort);
}
}
void test_inited(Str255 name)
{
if (!qd.thePort)
{
InitGraf(&qd.thePort);
InitFonts();
InitWindows();
InitMenus();
TEInit();
InitCursor();
SetUpMenus();
}
if (!crt_myWindow)
{
SetUpWindows(name);
}
}
int cwrite(int fd, const void *buf, int size)
{
int tot;
Ptr newtext;
test_inited(fd==2?"\pStdErr":"\pStdOut");
newtext = NewPtr(size);
if (!newtext) newtext = (Ptr)buf;
else for (tot = 0; tot < size; tot++)
{
newtext[tot] = ((char *)buf)[tot];
if (newtext[tot]=='\n') newtext[tot]='\r';
}
TESetSelect(32767,32767,crt_TEH);
TEInsert(newtext, size, crt_TEH);
if (newtext != (Ptr) buf) DisposPtr(newtext);
return size;
}
int cgetc(void)
{
EventRecord myEvent;
WindowPtr whichWindow;
short windowPart;
Rect r;
test_inited("\pStdIn");
for (;;)
{
MaintainCursor();
SystemTask();
TEIdle(crt_TEH);
if (GetNextEvent(everyEvent, &myEvent))
{
switch (myEvent.what)
{
case mouseDown:
windowPart = FindWindow(myEvent.where, &whichWindow);
DoMouseDown(windowPart, whichWindow, &myEvent);
break;
case keyDown:
case autoKey:
{
register unsigned char theChar;
theChar = myEvent.message & charCodeMask;
if ((myEvent.modifiers & cmdKey) != 0)
DoCommand(MenuKey(theChar));
else if (theChar == '\r')
return '\n';
else if (theChar < ' ')
{
TEKey(theChar, crt_TEH);
ShowSelect();
}
else return(theChar);
break;
}
case activateEvt:
if ( ((crt_myWindow != 0 ) && ((WindowPtr)myEvent.message == crt_myWindow)) )
{
if (myEvent.modifiers & activeFlag)
{
TEActivate(crt_TEH);
ShowControl(vScroll);
}
else
{
TEDeactivate(crt_TEH);
HideControl(vScroll);
}
}
break;
case updateEvt:
if ( ((crt_myWindow != 0 ) && ((WindowPtr) myEvent.message == crt_myWindow)) )
{
GrafPtr savePort;
GetPort(&savePort);
SetPort(crt_myWindow);
BeginUpdate(crt_myWindow);
EraseRect(&crt_myWindow->portRect);
DrawControls(crt_myWindow);
DrawGrowIcon(crt_myWindow);
TEUpdate(&crt_myWindow->portRect, crt_TEH);
EndUpdate(crt_myWindow);
SetPort(savePort);
}
break;
}
}
}
}